From suite
Generate test suites for suite:run by reading Kuma source code. Produces ready-to-run suites with manifests, validation steps, and expected outcomes for both Kubernetes and universal mode deployments. Use when creating a new test suite for a Kuma feature, converting a PR into a test plan, building regression tests from source code, or when the user asks for test coverage, a test plan, or wants to write tests for any Kuma policy or feature.
How this skill is triggered — by the user, by Claude, or both
Slash command
/suite:createThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- justify: I23 harness is installed on PATH by project SessionStart hooks, not bundled as a script -->
Generate test suites for suite:run by reading Kuma source code and emitting ready-to-run manifests, commands, and variant coverage.
Avoid using for running suites (use /suite:run), editing existing suites, or generating non-Kuma test plans, because create and execution need different guardrails.
All hooks route through harness-owned hook entrypoints installed by project SessionStart hooks, using the bare harness command on PATH.
If this skill resumes after compaction, trust the injected SessionStart(compact) handoff as the authoritative summary of the saved create workspace, approval phase, and cached worker outputs. Resume the exact review gate or writer/edit round described there. Do not rerun discovery or reinitialize approval unless the handoff explicitly says the saved state diverged and names the files that must be reloaded first.
Parse from $ARGUMENTS:
| Argument | Default | Purpose |
|---|---|---|
| (positional) | - | Feature or policy name (e.g., meshretry, meshtrace) |
--repo | auto-detect cwd | Path to Kuma repo checkout |
--mode | generate | generate (full AI) or wizard (interactive step-by-step) |
--from-pr | - | GitHub PR URL to scope the feature from |
--from-branch | - | Git branch to diff against master for scope |
--suite-name | derived from feature | Override suite name (must follow {feature}-{scope} pattern) |
--yes, -y | false | Run approval state in bypass mode, skip all user approval prompt review loops, and skip the final copy prompt |
echo "${XDG_DATA_HOME:-$HOME/.local/share}/harness/suites"git rev-parse --show-toplevel 2>/dev/null || echo "not in a git repo"ls -1 "${XDG_DATA_HOME:-$HOME/.local/share}/harness/suites" 2>/dev/null | head -20 || echo "none yet"harness create begin detects an existing suite, it will prompt for resolution.--mode generate)Before any other work, query what harness can do so the rest of the workflow can adapt:
harness setup capabilities
Parse the JSON output and keep it as the CAPABILITIES context for all later steps. Use it to:
readiness.profiles when it exists. Only offer profiles whose ready field is true. If a requested profile is not ready, summarize its blocking_checks instead of proposing it anyway.readiness.profiles may list multiple provider variants for the same Kubernetes profile name. For suite authoring, treat a profile as usable when any entry with that profile name is ready.required_dependencies to features that are both supported and ready now. Static support still comes from features.<name>.available, but live usability comes from readiness.features.<name>.ready when present.universal platform is listed and the matching readiness.platforms.universal.ready is true.features.envoy_admin.available is true and readiness.features.envoy_admin.ready is either true or absent.Interpretation rules:
available means harness knows how to do it in principle.readiness means the current machine, project, and repo are ready to do it now.--project-dir or --repo-root here unless you are explicitly debugging broken state.If readiness is absent (older harness binary), fall back to the older static logic based on cluster_topologies, platforms, and features.*.available.
If harness setup capabilities fails completely (binary too old, not installed), fall back to the hardcoded default assumption: both platforms available, all features available.
Manifest validation uses harness create validate --path <file>, which does local-only CRD validation without cluster access. No external binary install is needed. Continue to Step 2.
Before resolving paths, check for stale create state from a previous session:
harness create show --kind session 2>/dev/null
If state exists from a different feature or a previous day, run harness create reset to clear it before proceeding. If state exists for the same feature being authored, continue without reset.
Use the pre-resolved data directory and repo root from the preprocessed context above. Do not eagerly create DATA_DIR here; harness create begin creates the concrete suite directory when create starts.
Resolve REPO_ROOT: --repo flag > pre-resolved repo root (if in a git repo) > check if cwd has go.mod with kumahq/kuma > fail with message.
Run git rev-parse --show-toplevel and git branch --show-current in REPO_ROOT.
Ask the user showing the detected path and branch in the description (e.g., ~/Projects/kuma on feat/meshretry). Options:
If wrong location: run git worktree list and git branch --list, then present available worktrees and branches via a user approval prompt. After selection, update REPO_ROOT or run git checkout accordingly.
Identify what code to read based on the input:
pkg/plugins/policies/*<name>*/ directories. Read the API spec, plugin.go, validator.go, and test fixtures. Use Grep to search for the feature name in non-policy paths if no policy dir matches.--from-pr): run gh pr diff <number> --repo kumahq/kuma to identify changed files.--from-branch): run git diff master...<branch> --name-only to identify changed files.Handle ambiguity with a user approval prompt:
Error cases: if the feature name matches no policy dir and Grep finds nothing, ask for the exact path or a more specific name. If a PR URL returns a 404 or gh fails, fall back to a branch name or feature name.
Read references/suite-structure.md before deriving the suite name.
Derive the suite name following the {feature}-{scope} pattern before any workers run:
{feature}-core; focused suites use {feature}-{aspect}.Reject generic names like test-suite-1, full, feature-branch, my-test. The --suite-name flag overrides derivation.
SUITE_NAME="${SUITE_NAME:-<derived-per-rules-above>}"
SUITE_DIR="${DATA_DIR}/${SUITE_NAME}"
APPROVAL_MODE="${APPROVAL_MODE:-interactive}"
If --yes or -y is set, change APPROVAL_MODE to bypass before calling harness create begin and harness create approval-begin.
Immediately initialize the internal create workspace:
harness create begin \
--repo-root "${REPO_ROOT}" \
--feature "${FEATURE}" \
--mode "${APPROVAL_MODE}" \
--suite-dir "${SUITE_DIR}" \
--suite-name "${SUITE_NAME}"
Then save the scoped file inventory from step 4 with harness create save --kind inventory. Read references/agent-output-format.md for the inventory payload shape.
If the suite name or directory changes later, rerun harness create begin and then resave the inventory before any workers continue.
Read references/code-reading-guide.md for source navigation paths, references/variant-detection.md for signal taxonomy, and references/agent-output-format.md for payload contracts before constructing worker prompts.
Use the Agent tool to launch these workers in parallel:
Worker contract:
REPO_ROOT, the scoped file list from step 4, the feature name, and only the references needed for that worker.mode: "auto" so they can run harness create save via Bash without interactive approval. Background workers cannot prompt the user for tool permissions.After all workers finish, load the saved payloads with harness create show --kind inventory|coverage|variants|schema.
If any worker result is missing, malformed, or clearly incomplete, rerun only that worker instead of continuing with gaps.
Read references/suite-structure.md for the format spec. Read examples/example-motb-core-suite.md for a worked example of the suite format. Read examples/example-motb-core-group.md for the expected group file structure.
Build the proposal from the saved worker outputs:
harness create validate --path <file> on authored manifests before stopping. Do not defer to a live cluster.profiles includes multi-zone, set clusters: all on workload-deploying baselines per references/suite-structure.md.harness create save --kind proposal.## G{NN} {title}
Profile: {profile} | Platform: {platform}
Preconditions: {list}
What it tests: {2-3 sentence description of scope and method}
Manifests: {count} files ({filenames})
Success criteria: {list}
This summary is mandatory and must appear before the step 8 user approval prompt. The user approval prompt multiselect UI truncates descriptions, so the user needs the full picture printed as readable output first. Do not skip this summary or fold it into the user approval prompt options.
Group ordering rule - groups MUST be ordered by infrastructure complexity to avoid unnecessary cluster rebuilds:
Never interleave profiles - all groups for one profile must be contiguous. Within each tier, mark standalone tests that can run in parallel as parallelizable.
Variant review rules:
[uncertain] entries with evidence.If no variants survive review, continue with G1-G7 only.
Proposal rules:
required_dependencies must only contain harness infrastructure block names: docker, compose, kubernetes, k3d, helm, envoy, kuma, build. Application resources (otel-collector, demo-workload, postgres, redis, etc.) belong in baseline/ manifests, not in required_dependencies. The runner will reject unknown requirement names at startup.harness invocations. Only keep raw kubectl, kumactl, curl, or similar commands when the user explicitly asked for raw commands.gateway-api-crds when proposed groups touch MeshGateway, GatewayClass, Gateway, or HTTPRoute.--profile single-zone-universal), use REST API format manifests and harness run apply plus harness run kuma token and harness run kuma service commands per references/suite-structure.md.Build the full proposed suite in memory and, unless --yes or -y is set, run a mandatory user approval prompt review loop before creating ${SUITE_DIR} or writing any files.
Use the same user approval prompt header as step 8 so the suite path and runner command stay visible in every review round.
Review loop rules:
label + description form so the user sees the group ID and title on the left, with profiles, preconditions, and success criteria in the description preview on the right. Do NOT summarize groups in prose text. If one prompt is too small, split across multiple user approval prompt passes. Every page must include an All suggested groups option.harness create save --kind edit-request, and rebuild the proposal from cached worker outputs.harness create approval-begin --mode interactive --suite-dir "${SUITE_DIR}". If --yes or -y is set, use --mode bypass instead. If the suite name or directory changes during the pre-write review loop, rerun harness create approval-begin with the updated SUITE_DIR before asking the canonical pre-write approval question.suite:create/prewrite: approve current proposal? with options Approve proposal, Request changes, and Cancel. Approve proposal is the only answer that unlocks writes to ${SUITE_DIR}.--yes and -y are the only bypass.After the pre-write review gate approves the proposal, create the suite directory:
mkdir -p "${SUITE_DIR}/baseline" "${SUITE_DIR}/groups"
Launch these workers after approval:
${SUITE_DIR}/suite.md${SUITE_DIR}/baseline/*.yaml - the baseline-writer must validate that Service manifests have appProtocol set on all ports (catches missing appProtocol: http on demo-app services and similar). Baseline manifests must pass kubectl dry-run validation (via harness create validate) before the suite is marked complete.${SUITE_DIR}/groups/g{NN}-*.md and ${SUITE_DIR}/groups/g{NN}/*.yamlRead references/agent-output-format.md for the writer launch contract, fan-out limits, manifest validation rules, recovery sequence, and references/suite-structure.md for the manifest completeness rule and file content requirements.
Unless --yes or -y is set, immediately re-open the user approval prompt after the suite is saved.
Every user approval prompt in this loop must include the suite path and runner command in the description:
Suite path: ${SUITE_DIR}/Run command: /suite:run ${SUITE_NAME}Before the user approval prompt approval picker, print a full readable summary of the saved suite so the user can review what they are approving. For each group, print:
## G{NN} {title}
Profile: {profile} | Platform: {platform}
Preconditions: {list}
What it tests: {2-3 sentence description of scope and method}
Manifests: {count} files ({filenames})
Success criteria: {list}
Also include the suite metadata (name, feature, profiles, dependencies) and baseline files. This summary is mandatory and must appear before the post-write user approval prompt. The user approval prompt picker truncates descriptions, so the user needs the full picture printed as readable output first. Do not skip this summary or fold it into the user approval prompt options.
Post-write loop rules:
harness create save --kind edit-request, and rerun only the affected writer workers. Rerun a discovery worker only if the requested change invalidates the cached evidence.Edit instead of respawning a writer worker. Keep broader or multi-file changes in the writer-worker path.suite:create/postwrite: approve saved suite? with options Approve suite, Request changes, and Cancel. Approve suite is the only answer that unlocks a successful stop after suite files were written.suite:create/copy: copy run command? and the exact options Copy command and Skip. Do not offer the suite path as a copy target because the prompt already exposes it for manual copying.Print the saved path and suggest how to run it:
Suite saved to: ${SUITE_DIR}/
Run with: /suite:run ${SUITE_NAME}
Read references/operational-guide.md for wizard mode. Same state, workers, and gates as generate mode - review loop presents items individually instead of batch multiSelect.
Read references/operational-guide.md for hook codes KSA001-KSA010 emitted during suite create.
Read references/operational-guide.md for error recovery procedures.
Output structure:
~/.local/share/harness/suites/meshtrace-core/
├── suite.md
├── baseline/
│ ├── namespace.yaml
│ └── demo-app.yaml
└── groups/
├── g01-crud.md
├── g01/
│ ├── 01-create.yaml
│ └── 02-update.yaml
├── g02-validation.md
├── g02/
│ ├── 01-invalid-enum.yaml
│ └── 02-missing-field.yaml
├── g03-runtime.md
├── g03/
│ └── 01-policy.yaml
├── g04-e2e.md
├── g04/
│ └── 01-policy.yaml
├── g05-edge.md
├── g05/
│ └── 01-dangling-ref.yaml
├── g06-multizone.md
├── g06/
│ └── 01-policy.yaml
├── g07-compat.md
├── g07/
│ └── 01-legacy.yaml
├── g08-zipkin.md
├── g08/
│ └── 01-zipkin-backend.yaml
├── g09-otel.md
└── g09/
└── 01-otel-backend.yaml
npx claudepluginhub smykla-skalski/harness --plugin suiteScaffolds or migrates test-suite projects (API, E2E/UI, shared library) with archetype selection, scaffolding decisions, tag taxonomy, reporter stack, and CI integration.
Helps plan, write, review, execute, and maintain manual test cases with reproducible artifacts traceable to design documents.