ワンクリックで
development
Work rules, testing, validation, and change integrity. Read before writing or modifying code.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Work rules, testing, validation, and change integrity. Read before writing or modifying code.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Benchmark runner, fixture repos, and publication. Read before running, modifying, or publishing benchmark results.
Pull request submission flow. Read only when the user explicitly asks for a pull request.
Self-Review, Review Cycle, Discussion, and Research Review Round workflows. Read the Exhaustive rounds and Stop condition rules before any review round (solo or team); read the Briefing subagents rule before delegating to any subagent; read in full when the user asks for a named mode.
What ttsc is, the workspace layout, and the canonical commands.
READMEs and website guides. Read before writing or modifying docs.
Keeping packages/ttsc/shim/* synced with typescript-go and complete for plugin authors. Read before adding a re-export, bumping the pinned typescript-go version, or chasing a missing AST/transform/printer/emit API a plugin needs.
| name | development |
| description | Work rules, testing, validation, and change integrity. Read before writing or modifying code. |
These four are never acceptable; choosing any one means the approach is already wrong.
transformSource, transformOutput) are not part of the public contract.shim.go files marked gen_shims:hand-maintained are not regenerated.website/src/content/docs/ in the same change.pnpm format before every commit and stage the result; never commit unformatted output. This keeps the tree consistent with the format gate and avoids a follow-up "format" commit.First-party plugin configuration lives in dedicated *.config.{ts,cts,mts,js,cjs,mjs,json} files, auto-discovered by upward walk from the entry. Shipped ttsc packages accept only configFile (an explicit path) beyond host-owned entry keys.
Inline option keys for @ttsc/banner, @ttsc/paths, @ttsc/strip, and @ttsc/lint were withdrawn so package config has one typed, discoverable home, do not reintroduce them.
One test case per file, named after what it asserts. Applies to both layers.
packages/*/test/; one Test* per file. Run the real command entrypoint (e.g. go run ./plugin) so wrapper branches stay covered.tests/test-*/src/features/. The suites that build real Go plugin binaries additionally split those go-binary scenarios into tests/test-*/src/native-plugins/<category>/ so CI can isolate them on their own trimmed-build lanes; the cheap tests stay under features/. Each file exports exactly one test_<snake_case> function with a matching file name; DynamicExecutor discovers them by prefix. Materialize a temp project, spawn the real binary, and assert on observable output.Open every case with a doc comment in the same three-part shape: a one-line Verifies … headline, a short paragraph stating the non-obvious why (which branch or regression is being pinned), and a 2–4-step numbered list summarizing the scenario.
/**
* Verifies plugin corpus: composes rejects cycle between two plugins.
*
* Locks the cycle-detection branch in
* `loadProjectPlugins.ts::composePluginSources`. Composition is one hop only;
* reciprocal `composes` arrays would silently reswap the binaries of both
* plugins, so ttsc throws an explicit error instead of routing to the wrong
* binary.
*
* 1. Two plugin descriptors each list the other in `composes`.
* 2. Run ttsc.
* 3. Assert non-zero exit and `composes cycle detected` in stderr.
*/
export const test_plugin_corpus_composes_rejects_cycle_between_two_plugins =
() => {
/* ... */
};
Use the shared helpers in tests/utils and the per-suite internal/ modules; do not reach into another suite's internals. Regressions that need a real directory layout (not just a synthetic temp file map) go under tests/projects.
A test that only feeds a rule its own canonical output and asserts it is unchanged proves idempotency, not correctness. That gap is how a batch of formatter over-matches shipped: the predicates hugged or broke shapes Prettier leaves alone, yet every test fed an already-correct example, so nothing fired. Each rule or predicate needs more than its happy path:
format, the upstream ESLint rule for a lint port), never from whatever the current code happens to emit. A snapshot written against the code's own output locks its bugs in.This is not a formatter-only rule. The same happy-path bias hides autofix corruption and edge-case faults across the lint set, so every rule carries the burden.
Run the narrowest command that proves the change first, then a broader command when shared behavior or packaging changed. Report any command that could not be run.
Verification shape depends on the change type:
Treat tests, fixtures, snapshots, CI workflows, package wiring, dependencies, core algorithms, and generated baselines as part of the specification. Changing them requires an explicit user request or a clear product reason, and the final report must call it out.
For mechanical ports, migrations, or broad rewrites, preserve the existing algorithm and public behavior in reviewable slices. Prefer a concrete exemplar over abstract instructions, and inspect the diff before trusting a green test run.