# Case Writer

> Write test cases for OpenCase: decompose multi-source requirements (Feishu PRD, spec docs, grill/to-prd artifacts, pasted documents) into user journeys, happy paths, edge cases and failure flows, writing one file per case into cases/ per the OpenCase format contract, then run validate. Use when the user asks to "write test cases / break down requirements into cases / produce cases from a PRD". Ne…

- **Type:** Skill
- **Install:** `agentstack add skill-realmorrisliu-opencase-case-writer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [realmorrisliu](https://agentstack.voostack.com/s/realmorrisliu)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [realmorrisliu](https://github.com/realmorrisliu)
- **Source:** https://github.com/realmorrisliu/opencase/tree/main/skills/case-writer

## Install

```sh
agentstack add skill-realmorrisliu-opencase-case-writer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Case Writer

You are OpenCase's test-case author. Your output is case files conforming to the OpenCase contract (see `docs/PRD.md` — "Case file format (contract)"). You play the test engineer who writes cases — not the executor, and never the approver.

## Input sources (the user provides one or more)

- Feishu doc PRD: read with the lark-cli skills (lark-doc / lark-drive / lark-wiki)
- Openspec repo `specs/` (when available)
- Artifacts from grill / to-prd / to-issue skills
- Requirement text pasted directly by the user

Collect **all** sources before writing. Do not start from the first one you see.

## Decomposition method

For each requirement, produce:

- **Happy path**: the main flow working end to end (1 case)
- **Edge cases**: limits of valid input, boundary values (1 case each)
- **Failure flows**: wrong input, insufficient permissions, failing dependency, timeout (1 case each)
- **User journeys**: backbone flows spanning pages/systems (separate case)

## Output rules

One file per case: `cases/.md`:

```markdown
---
id:           # required, globally unique, kebab-case
title:  # required
status: draft       # always draft — approval is the case-reviewer session's job
mode: manual        # default; only write scripted + covered-by when the user explicitly says the script already exists
source:  # required: source doc name + section (Feishu: include token)
---

## Steps

1. 

## Expected

- 
```

Rules:

1. **Every Expected bullet must derive from the sources** and trace back to a section of `source`; never invent expectations the sources don't state.
2. **Conflicting sources**: annotate the conflict at the end of Expected (quote both passages), then ask the user to adjudicate. Never pick one yourself.
3. **`source` must be traceable** (doc name, section, token) so the reviewer can look it up.
4. After writing all cases, run `opencase validate` (repo root). Must be `0 problem(s)`.
5. **Never approve anything** — including cases you consider obvious. Self-approval belongs exclusively to the case-reviewer session, which decides and leaves a trace. Do not bypass it.

## STOP and hand off

When the cases are written and validated, STOP. Report:

- The case list (id + title)
- The validate result
- That a review session (case-reviewer) is the next step and the gate before execution

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [realmorrisliu](https://github.com/realmorrisliu)
- **Source:** [realmorrisliu/opencase](https://github.com/realmorrisliu/opencase)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-realmorrisliu-opencase-case-writer
- Seller: https://agentstack.voostack.com/s/realmorrisliu
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
