generate-scenarios — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited generate-scenarios (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Design and write .kensa/scenarios/*.yaml files for agent evaluation.
Setup → ► Design → Execute → Diagnose → IterateThis skill produces scenario files. It follows audit-evals (first time) or diagnose-errors (iteration). After writing scenarios, the next step is kensa eval.
Before writing scenarios, understand the agent. If coming from audit-evals, the codebase scan is already done. Otherwise, identify:
If `kensa init --example` was used, a demo scenario exists at .kensa/scenarios/example.yaml and a demo agent at .kensa/agents/example.py. Read both to understand the scaffolded structure, then replace them with real scenarios targeting the user's agent. Don't build on the example, it's a template, not a starting point. Plain kensa init (no --example) leaves .kensa/scenarios/ empty.
If traces exist from a previous run, read them first:
kensa analyze --format jsonUse flagged traces to inform scenario design. Traces with errors, cost outliers, or repeated tool calls reveal real failure modes worth testing.
kensa capture → kensa generateThe grounded path. kensa capture records one real agent invocation, then kensa generate synthesizes scenarios from the captured trace. Generated scenarios carry replay semantics: the captured argv and input are reused so the scenario re-runs the same command shape.
kensa capture -i "<example input>" -- <agent run command>
kensa generate -n 5 --dry-run # preview
kensa generate -n 5 # write to .kensa/scenarios/Pass -i so generated scenarios can vary the input. Without it, every generated scenario replays the same baked-in prompt and kensa generate will warn.
If traces already exist from a prior capture, skip straight to kensa generate. Review before committing: the CLI enforces structural rules, you own scenario quality.
If coming from `diagnose-errors`, the diagnosis context (which scenarios failed, root causes, fix category) should guide what you write. Target the specific failure patterns identified, don't regenerate from scratch.
Generate 3-7 scenarios covering these categories:
Not every category needs a scenario. Match coverage to the agent's complexity.
When writing the YAML, load ${CLAUDE_SKILL_DIR}/references/scenario-schema.md for the full schema, available check types, and examples.
Save each scenario to .kensa/scenarios/{id}.yaml.
Inline criteria work for simple, objective evaluations:
criteria: |
The agent should provide a clear weather report for the requested city.
It must use the weather tool, not hallucinate data.Structured judge prompts work for subjective criteria that need explicit pass/fail boundaries. If your criteria are longer than 3 lines or require nuance, use the generate-judges skill to create .kensa/judges/*.yaml files, then reference them:
judge: tone-match # loads .kensa/judges/tone-match.yamlcriteria and judge are mutually exclusive.
After writing, present a summary table:
| # | Scenario ID | Tests | Checks | Priority |
|---|---|---|---|---|
| 1 | weather_basic | Happy path weather query | tools_called, output_contains, max_turns | Correctness |
| 2 | weather_edge | Empty city input | output_contains | Edge case |
One line per scenario. Ask if the user wants adjustments before running.
After writing scenarios, verify they execute correctly:
kensa eval -s <scenario_id>If a scenario errors (exit code -1), fix the run_command or env_overrides before proceeding. Common issues: wrong entry point path, missing env var, run_command written as a string instead of a list.
Once scenarios run cleanly, the user is ready for the full eval loop: kensa eval.
When editing scenarios (not creating from scratch):
criteria: to judge: and use generate-judgesrun_command as a string (e.g. python agent.py {{input}}). It must be a list of argv elements (e.g. [python, agent.py]); the scenario input is appended automatically.output_matches. LLM output is non-deterministic. Use output_contains with key phrases.max_cost or max_turns.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.