/tm-forum-oda-consumer:generate-test-cases-from-usecasefrom tm-forum-oda-consumer
Generates BDD-style Gherkin test scenarios from TM Forum ODA use-case IDs (TMFSxxx) by reading sequence diagrams and linked component/API frontmatter, grounding tests in real cached OpenAPI schemas.
Ships in tm-forum-oda-consumer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
BDD-style Gherkin scenarios for a TMFSxxx use case's interaction flow,
citing the real ODA component and Open API IDs the use case actually
depends on — never a plausible-sounding invented one. Every TMFCxxx/
TMFxxx id in the output must trace back to something actually present
in the source use case's own frontmatter or a cached API schema, not
something that merely sounds right for the scenario.
This mirrors oda-canvas's write-bdd-feature skill's Gherkin
conventions (tags, Given/When/Then structure, Scenario Outline +
Examples table), adapted to this repo's own id scheme — TM Forum's
TMFSxxx use-case numbering, not oda-canvas's internal UC{number}
scheme, which is a different, unrelated numbering system for that repo's
own Canvas-lifecycle test suite. Don't borrow UC{number} literally.
Run check-usecase-maturity (this repo's other pilot skill) against the id
before drafting anything. Include its verdict at the top of the output
(e.g. "Source: TMFS030, Beta / Member Evaluated — scenarios below are
provisional and should be re-validated once this use case reaches GA").
Don't silently draft test cases against an Alpha/Beta use case as if it
were settled — the reader needs that caveat to weigh how much to invest in
the tests you're about to hand them.
${CLAUDE_PLUGIN_ROOT}/knowledge/use-cases/{ID}/{ID}.md
Read the # Description and # Sequence diagrams sections (heading
wording varies slightly across documents — look for both). Worth
knowing up front: the actual interaction steps usually live in embedded
diagram images, not in text. docx2md.py
extracts each document's original diagrams as real image files under
${CLAUDE_PLUGIN_ROOT}/knowledge/use-cases/{ID}/media/imageNN.png (or .jpeg), referenced
inline as . Don't treat these as decorative and
skip past them — read every image a Sequence Diagrams section
references (the Read tool handles images directly) to see the actual
actor/step flow; the surrounding prose is often only a partial gloss on
what the diagram shows, and sometimes (TMFS002, TMFS030) the only real
step breakdown is the sequence of ## Step N: ... subheadings each
paired with one diagram.
Document shapes vary — don't assume one pattern:
The use case's own frontmatter is the authoritative id list:
links:
components:
- id: TMFC020
name: Digital Identity Management
apis:
- id: TMF632
name: Party Management v4
Body prose frequently names a capability without its id ("Party
Interaction Management APIs", "the Product Catalog") — match it against
links.components/links.apis by name to get the real id. If a
capability named in the body has no matching entry in frontmatter, say so
explicitly in the output rather than inventing a plausible TMFCxxx/
TMFxxx id for it. A wrong-but-plausible id is worse than an honest
gap; links are data, not prose — never resolved from how a name sounds.
Two gotchas to know before you hit them:
docx2md.py only extracts links.components/links.apis from a
document's dedicated References section. TMFS020's own body
text, under "Main ODA Components involved in this process" beneath its
Sequence Diagrams heading, names TMFC001, TMFC002, and TMFC023 in
plain text — real, correctly-formed TM Forum ids that never made it into
this document's own frontmatter. These are NOT invented and are fine to
cite — they're the source document's own words — but cite them with a
"body text, not frontmatter" source note (e.g. "TMFC001 — named in
this document's own Sequence Diagrams section, not in its frontmatter
links"), so the reader can tell the difference between an id backed by
the structured envelope and one only backed by body prose.TMFCxxx with a literal ??? instead of digits is the source
document's own explicit placeholder, not a redacted real id. The same
TMFS020 section contains TMFC??? ProductOffering Qualification / TMFC??? Resource Qualification (tbc) and TMFC??? Party Request Management —
TM Forum's own authors marking "no component id assigned yet." Never
resolve a ??? placeholder to a real id by guessing which existing
TMFCxxx it probably means. If it's worth mentioning in the output at
all, cite it verbatim as "not yet assigned (TMFC??? in source)," not as
a numbered id.Also check ${CLAUDE_PLUGIN_ROOT}/knowledge/index/usecase-component-matrix.json for the same
id and cross-reference against ${CLAUDE_PLUGIN_ROOT}/knowledge/index/matrix-discrepancies.md
— if the use case you're drafting against is one of the flagged
disagreements, note that in the output too (e.g. "TMFC050 appears in
IG1228's matrix for this use case but not in the document's own
References section — included here on the matrix's authority, flagged as
matrix-only per matrix-discrepancies.md").
For each resolved API id + version, read the cached schema:
${CLAUDE_PLUGIN_ROOT}/knowledge/apis/{TMFxxx}/{TMFxxx}_v{version}.json
It's a Swagger/OpenAPI document — paths gives real resource paths
(/individual, /individual/{id}) and each operation's real
operationId (listIndividual, createIndividual, ...). Use these —
not invented endpoint names — when a Gherkin step needs to reference a
specific call. If the id's status in ${CLAUDE_PLUGIN_ROOT}/knowledge/index/apis.json is
not_yet_specified or fetch_failed, say so in the output instead of
drafting a step against a schema that doesn't exist; a Given/When
step can still describe the intent in plain language, just without
citing a concrete path/operation that isn't actually cached.
Adapted from oda-canvas's write-bdd-feature (same shape, this repo's
own id scheme):
# Generated from ${CLAUDE_PLUGIN_ROOT}/knowledge/use-cases/{ID}/{ID}.md ({maturity} / {approval_status})
# Component/API ids cited below are taken from this use case's own frontmatter
# links and/or ${CLAUDE_PLUGIN_ROOT}/knowledge/index/usecase-component-matrix.json -- see Sources.
@{ID}
@{ID}-F{feature-number}
Feature: {ID}-F{feature-number} {Feature Title}
Background:
Given [shared preconditions, if any]
Scenario Outline: {Descriptive scenario name}
Given [initial context, citing the real component/API by id+name]
When [the action, citing the real API operation if one is grounded in Step 3]
Then [expected outcome]
Examples:
| Name | ...
| Descriptive | ...
{ID}-F{feature-number}-{Descriptive-Title}.feature
(e.g. TMFS030-F001-Request-Wholesale-Capacity-Quote.feature).write-bdd-feature: @{ID} (use-case level) and
@{ID}-F{feature-number} (feature level).Scenario Outline + Examples over repeated individual
Scenario blocks when the same flow varies only by data, matching
write-bdd-feature's stated preference.feature-definition-and-test-kit-style directory of
its own (that's an oda-canvas-specific test harness) — don't write
the .feature file into ${CLAUDE_PLUGIN_ROOT}/knowledge/, which is generated,
regeneratable output. Return the feature file content to the caller;
where they save it is their decision, not this skill's.End every generated feature file with a citation block:
# Sources:
# TMFC020 Digital Identity Management -- ${CLAUDE_PLUGIN_ROOT}/knowledge/use-cases/{ID}/{ID}.md links.components
# TMF632 Party Management v4.0.0 -- ${CLAUDE_PLUGIN_ROOT}/knowledge/apis/TMF632/TMF632_v4.0.0.json
# TMFC050 -- ${CLAUDE_PLUGIN_ROOT}/knowledge/index/usecase-component-matrix.json only (not in this document's own References section; see matrix-discrepancies.md)
Every id that appears in a Given/When/Then step must have a matching
line here. If you can't cite where an id came from, it doesn't belong in
the scenario — go back to Step 2.
oda-canvas-specific step vocabulary (Given a running helm release, Kubernetes/Helm lifecycle steps) unless the use case is
actually about ODA component deployment lifecycle — most TMFSxxx use
cases are business-process flows (order capture, party management,
fault resolution), not component installation, and forcing Canvas
test-kit phrasing onto a business scenario would misrepresent what's
being tested.${CLAUDE_PLUGIN_ROOT}/knowledge/ is
skills-read-only generated content; this skill's output is a
deliverable for the caller to place wherever their own test suite
lives.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
bdd, gherkin, test-generation, tm-forum, oda, use-case-testing
Other plugins' skills for the same job
npx claudepluginhub tmforum-oda/oda-agent-skills-marketplace --plugin tm-forum-oda-consumer19 skills in this plugin
/assess-change-impactGiven a TM Forum ODA component (TMFCxxx), Open API (TMFxxx), or eTOM process (GB921 id such as 1.2.20) and a proposed change (deprecation, breaking version bump, removal), lists every TMFSxxx use case that depends on it, describes specifically how each one uses it, and drafts a maturity-weighted migration/impact report. Use this before deprecating, breaking, or removing a component, API, or eTOM process./audit-implementation-against-componentGiven a TMFCxxx component id and a description of an existing implementation, checks conformance at Component-boundary granularity, split explicitly the way component.yaml itself is split -- Core Function (does it expose/consume the real exposedAPIs/dependentAPIs) and Supporting Function (does it provide the managementFunction/securityFunction behaviors the spec describes) -- reported as two separate dimensions, never blended into one score. Use this to audit a component's full contract independent of any specific use case; see audit-implementation-against-usecase for flow-level auditing against one use case's narrative instead./audit-implementation-against-usecaseGiven a TMFSxxx use-case id and an existing implementation (codebase, API contract, or integration config), checks whether the implementation actually follows the use case's described flow and calls the right real APIs, flagging drift from spec. Use this to audit an existing system against ODA, not to design a new one.