ワンクリックで
workflow-write-test
Create executable RED specifications before implementation, or record valid Smelter TDD exemptions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create executable RED specifications before implementation, or record valid Smelter TDD exemptions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when: User wants to run a SUBSTANTIAL multi-step coding task as a workflow (fix/implement a whole issue or feature, comprehensive review), CREATE workflows or commands, set up workflow automation, or manage workflow configuration. Triggers (run): "use workflow to", "run workflow", "with workflow", "workflow to", "workflow run", "use a workflow to", "run a workflow", and generic task-completion intents that imply a full coding deliverable: "실행해줘", "돌려줘", "구현해줘", "고쳐줘", "이슈 고쳐줘", "PR 만들어줘", "implement this", "fix this issue", "build this feature", "ship this". Triggers (create): "create a workflow", "write a workflow", "make a command", "author a workflow", "new workflow", "new command", "workflow yaml". Triggers (setup): "set up workflows", "install workflow automation", "how to use workflows", "configure workflows", "workflow setup", "get started with workflows". Triggers (config): "change my workflow config", "modify workflow config", "workflow
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
Smelter deep interview for planning-first requirement discovery before /brainstorm, /implement, or /fix execution
Create a release from dev branch. Generates changelog entries from commits, bumps version, and creates a PR to main. TRIGGERS - Use this skill when user says: - "/release" - create a patch release (default) - "/release minor" - create a minor release - "/release major" - create a major release - "make a release", "cut a release", "ship it", "release to main"
Replicate and validate a GitHub issue by spinning up Smelter, analyzing the issue, and systematically testing all described symptoms using browser automation. Use when: User wants to reproduce a bug, validate a GitHub issue, confirm a reported problem, or investigate whether an issue is real before working on a fix. Triggers: "replicate issue", "reproduce issue", "validate issue", "confirm bug", "test issue", "can you reproduce", "try to replicate", "verify the bug". Capability: Checks out main, pulls latest, starts Smelter, reads the GitHub issue, then uses agent-browser to systematically test every symptom and produce a findings report. NOT for: Fixing issues (use /smelter or /exp-piv-loop:fix-issue), general UI testing (use /validate-ui).
Autonomous rule adherence checker. Scans the codebase for rule violations, fixes the highest-impact ones in an isolated worktree, runs full validation, creates a PR. Uses memory to track progress across runs.
| name | workflow-write-test |
| description | Create executable RED specifications before implementation, or record valid Smelter TDD exemptions. |
| version | 0.55 |
| type | workflow |
| consumes | tasks.md OR implementation-plan.md |
| produces | executable specification tests (RED), test_cycles entries |
| default_pattern | C |
| default_agent | executor |
| supports_patterns | ["A","C"] |
| team_template | {"C":{"parallel_split_by":"file","agents":["executor"],"aggregator":"executor","sync_point":"test suite ready"}} |
| can_delegate_to | ["tdd-guide","test-driven-development"] |
| gate | {"postcondition":[{"test_files_exist":true},{"min_cases":10},{"all_red":true},{"test_cycle_entries":">=1 with action=added_case"}]} |
| exempt_if_surface | ["css","style","typography","i18n","copy","typo","dialogue"] |
Write an executable specification before any implementation file changes. The output is a failing test suite that specifies the requested behavior with concrete examples, then records RED evidence for the next skill.
Use Specification by Example, BDD, and ATDD principles: clarify behavior through examples, formulate those examples as tests, and automate them before coding.
Core principle: If you didn't watch the executable specification fail for the intended missing behavior, you don't know if it tests the right thing.
Violating the letter of this rule is violating the spirit of this rule.
Announce at start: "I'm using workflow-write-test to write failing executable specifications before source code changes."
Read the active mode's persisted planning source before writing tests:
/fix → tasks.md is the compact v0.55 checklist; use investigation.md only as supporting evidence./implement → implementation-plan.md is the source of the file map, chosen approach, task queue, and test strategy./brainstorm does not invoke this skill directly; its tasks.md is consumed later by /implement as requirements context.Use the persisted plan as input only. If the behavior cannot be expressed as a failing test, stop and route back for clarification instead of coding.
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Write implementation code before the executable specification? Delete it. Start over. No exceptions:
Implement fresh from the executable specification. Period.
Every new or modified test must specify externally observable behavior, not implementation details. Prefer Given/When/Then for scenarios or Arrange/Act/Assert for unit-level specs.
Each spec must include:
Do not assert private helpers, internal call order, temporary structure, or other implementation details unless they are the public contract. Open behavior questions block coding; return to clarification rather than inventing behavior.
| Category | Minimum |
|---|---|
| happy path | 2+ |
| boundary | 2+ |
| error path | 2+ |
| edge case | 2+ |
| integration | 1+ |
A test file with 9 cases fails the gate. A test file with 10 happy-path cases and no boundary/error coverage also fails because the distribution check runs.
Choose the lowest-level test that fully specifies the behavior:
| Thought | Reality |
|---|---|
| "I'll write tests after the code compiles" | That's not TDD. Delete the code, write the executable spec first. |
| "Just this once, the code is trivial" | Triviality is rationalization. Write the test. |
| "I'll keep the existing code as reference while writing the test" | Don't look at it. Implement fresh from tests. |
| "10 cases is overkill for this change" | The gate checks distribution, not just count. Plan distribution before writing. |
| "Tests don't need to fail — I know the function works" | Watch it RED. Tests that are GREEN on first run test nothing. |
| "Mocks are fine for this test" | Prefer real code. Mocks hide the bug the test should catch. |
| "The test can describe internals" | Specs describe behavior. Implementation details make tests brittle. |
| Excuse | Reality |
|---|---|
| "I'm confident it works" | Confidence ≠ evidence. Run the test RED, then GREEN. |
| "I'm tired" | Exhaustion ≠ excuse. TDD is the speed shortcut, not the slowdown. |
| "The spec already tests this" | workflow-write-test produces NEW RED cases for the current change. Existing tests are not new evidence. |
| "Integration tests are enough" | Integration ≠ unit. Distribution requirement is there for a reason. |
action: modified_case)case_name to the task/bug idWhen state.json.exempt.tdd == true, this skill is auto-skipped and flow advances to the next skill.
(Set via the mode's magic_keywords or persisted planning source.)
Exempt surfaces: CSS/style, typography, i18n/copy-only, typo, pure dialogue. The exemption must be declared up-front; the executor cannot demote TDD mid-flow.
When Pattern C is chosen with parallel_split_by: file:
Append to state.json.test_cycles:
{ "file": "...", "action": "added_case", "case_name": "...", "run_result": "fail", "error": "..." }
workflow-coding pre-gate reads this array. Without at least one { action: added_case|modified_case, run_result: fail } entry for the executable specification, coding refuses to start.
/fix gate failure because the bug is not reproducible or expected behavior is unclear → workflow-investigate/implement gate failure because the task queue or test strategy is incomplete → workflow-implementation-planREQUIRED NEXT SKILL: workflow-coding
Do NOT:
workflow-agent-review or beyond — implementation has not happened yetThe RED tests are the gate. workflow-coding consumes them immediately.