diff --git a/.github/instructions/benchmark.instructions.md b/.agents/skills/benchmark/SKILL.md similarity index 51% rename from .github/instructions/benchmark.instructions.md rename to .agents/skills/benchmark/SKILL.md index 2e586708d..e87c285d9 100644 --- a/.github/instructions/benchmark.instructions.md +++ b/.agents/skills/benchmark/SKILL.md @@ -1,7 +1,11 @@ --- -applyTo: '**/*.benchmark.ts' +name: benchmark +description: Run and author benchmark tests in xterm.js. Use when editing benchmark files, working in `*.benchmark.ts`, or when asked how to run the full benchmark suite, a single benchmark file, or a single benchmark case. --- -# Benchmark run instructions + +# Benchmark Run Instructions + +## Running Benchmarks - Full suite: `npm run benchmark` - Single benchmark file: @@ -11,8 +15,14 @@ applyTo: '**/*.benchmark.ts' - Use `-t` to get the path, then: - `npm run benchmark -- -s "" out-test/benchmark/Event.benchmark.js` -When writing instructions, use `RuntimeCase` to measure pure runtime in ms, use `ThroughputRuntimeCase` when measuring throughput in MB/s. +## Benchmark Case Selection + +When writing benchmark instructions: + +- Use `RuntimeCase` to measure pure runtime in ms. +- Use `ThroughputRuntimeCase` when measuring throughput in MB/s. + +## Notes -Notes: - Benchmarks run from built JS in `out-test/benchmark/*.benchmark.js`. - Keep `NODE_PATH=./out` (handled by the npm script). diff --git a/.github/instructions/unit-test.instructions.md b/.agents/skills/unit-test/SKILL.md similarity index 51% rename from .github/instructions/unit-test.instructions.md rename to .agents/skills/unit-test/SKILL.md index f139e8223..a285983b5 100644 --- a/.github/instructions/unit-test.instructions.md +++ b/.agents/skills/unit-test/SKILL.md @@ -1,7 +1,11 @@ --- -applyTo: '**/*.test.ts' +name: unit-test +description: Write and review xterm.js unit tests with project conventions. Use when editing `*.test.ts` files or when asked for test authoring guidelines. --- -When writing unit tests follow these rules: + +# Unit Test Instructions + +When writing unit tests, follow these rules: - When writing unit tests for addons, always create a real xterm.js instance instead of mocking it. - Prefer `assert.ok` over `assert.notStrictEqual` when checking something is undefined or not. diff --git a/.github/hooks/setupRepo.json b/.github/hooks/setupRepo.json deleted file mode 100644 index 5dd0c6560..000000000 --- a/.github/hooks/setupRepo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "hooks": { - "SessionStart": [ - { - "type": "command", - "command": "npm run agent:setup-repo" - } - ] - } -} \ No newline at end of file diff --git a/.github/copilot-instructions.md b/AGENTS.md similarity index 100% rename from .github/copilot-instructions.md rename to AGENTS.md diff --git a/bin/agent/setup-repo.mjs b/bin/setup-full.mjs similarity index 100% rename from bin/agent/setup-repo.mjs rename to bin/setup-full.mjs diff --git a/package.json b/package.json index 151566544..7cd19edaf 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "scripts": { "presetup": "npm run build", "setup": "npm run esbuild", + "setup-full": "node bin/setup-full.mjs", "postsetup": "npm run esbuild-demo-server", "start": "node demo/start", "dev": "concurrently -k -p [{name}] -n tsc,esbuild,esbuild-demo-client,esbuild-demo-server,server -c blue,yellow,cyan,green,magenta \"npm:tsc-watch\" \"npm:esbuild-watch\" \"npm:esbuild-demo-client-watch\" \"npm:esbuild-demo-server-watch\" \"npm:start\"", @@ -72,8 +73,7 @@ "prepackage-headless": "npm run esbuild-package-headless-only", "package-headless": "webpack --config ./webpack.config.headless.js", "postpackage-headless": "node ./bin/package_headless.js", - "prepublishOnly": "npm run package", - "agent:setup-repo": "node bin/agent/setup-repo.mjs" + "prepublishOnly": "npm run package" }, "devDependencies": { "@lunapaint/png-codec": "^0.2.0",