Eval suite maintainer
Skill tuanductran/soulmap-ai/.claude/skills/eval-suite-maintainer
Maintain the evaluation suite by managing routing groups, response cases, and Markdown contract sync checks across evals/datasets/.From its SKILL.md
npx -y skills add tuanductran/soulmap-ai --skill eval-suite-maintainerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.7 KB, as published. Nobody here has run it
Eval suite maintainer
Use this skill when working with the evaluation suite infrastructure: adding test cases, writing framework assertions, validating source markers, and running evals.
Do not use this skill for
- Modifying the core framework selection logic, use code editing tools directly and follow
../rules/detector-development.md - Writing framework skill files (Activation Signals, Response Structure), use
framework-author - Developing new detector modules, use
detector-engineer - Creating non-eval tests, use standard pytest patterns
Mission
The eval suite (evals/datasets/) is the executable source of truth for what behavior
SoulMap must exhibit. This skill maintains that source of truth by:
- Adding new test groups that represent real user inputs
- Writing clear framework expectations backed by source documentation
- Keeping runtime wording and Markdown wording aligned through contract cases
- Ensuring test cases trace back to framework documentation
- Validating that eval results pass before merging changes
The role of evals/datasets/groups.json
evals/datasets/groups.json is not configuration. It is executable specification.
Each group is a cluster of related test cases. Each item tests whether SoulMap:
- Selects the correct primary framework for that input
- Passes safety checks with the expected status and reason
The group structure guarantees that:
- Every test case is backed by a source file (framework skill, template, or other documentation)
- Test cases can be traced back to the language that inspired them
- Framework selection decisions are auditable
Sources of truth
Always check these files first:
evals/README.md, how to run evals and interpret results../rules/evals-and-testing.md, group structure conventions and schemaskills/frameworks/, the authoritative framework definitionsevals/datasets/groups.json, the current eval stateevals/datasets/response_generation_cases.json, end-to-end response casesevals/datasets/markdown_contract_cases.json, cross-file sync cases
When to add a test group
Add a new group to evals/datasets/groups.json when:
- A framework file has been updated or created and needs test coverage
- A new template or quick-reference entry has been added
- You discover a real user input that should trigger a specific framework
- A framework selection decision needs to be auditable (via source markers)
Do NOT add a group just to test code-use tests/ for that.
Structure of a test group
{
"g": "Human-readable group name describing what is tested",
"cat": "short category code (wl1, wl2, crisis, and so on)",
"sources": [
"skills/meta/response-structure.md",
"skills/meta/quick-reference.md"
],
"source_markers": {
"skills/meta/quick-reference.md": "quoted text from that file"
},
"items": [
{
"t": "test input text",
"note": "what this tests and why",
"expect_primary_framework": "MIRROR",
"expect_mode": "MIRROR",
"expect_safety_status": "PASS",
"expect_safety_reason": "no_override"
}
]
}
Required fields:
g, group name (clear, human-readable)cat, category code (consistent across related groups)sources, list of documentation files that justify this groupitems, array of test cases
Optional fields:
source_markers, object mapping file paths to specific quoted text
Writing expect_primary_framework assertions
The expect_primary_framework field is the contract: SoulMap MUST select this framework for this input.
Valid framework names:
MIRROR, reflective mode (default)CRISIS, immediate crisis signalsDEPENDENCY, unhealthy AI dependencyGRIEF, acute grief signalsDE_ESCALATION, moderate emotional intensityEXISTENTIAL, existential confusionINNER_PARTS, inner conflictDIRECTION, life direction confusionSHADOW, shadow patternsMEANING_INTEGRATION, integration momentsSYNTHESIS, theme synthesis on request
Rules:
- Match the framework name exactly to the file in
skills/frameworks/ - Use uppercase names, for example
CRISISrather thanCrisis - If uncertain, use
MIRROR(the default) - Do not expect a framework lower priority than what the input naturally triggers
- Reference the framework file's priority in comments if it helps explain the choice
Example:
{
"t": "I just found out my mother died",
"note": "Acute loss, triggers Grief (higher priority than Mirror)",
"expect_primary_framework": "GRIEF",
"expect_mode": "SANCTUARY",
"expect_safety_status": "PASS",
"expect_safety_reason": "no_override"
}
Defining source_markers
Use source_markers to create an audit trail. Map file paths to direct quotes from those files.
"source_markers": {
"skills/frameworks/grief-companion.md": "acute loss, fresh grief",
"skills/meta/quick-reference.md": "I just found out..."
}
Rules:
- Include quotes verbatim (or very close) from source files
- Use markers only for test cases backed by explicit source text
- Omit markers if a test case is general (not tied to specific language)
- Update markers if the source file language changes
Running and validating evals
Check eval status
uv run soulmap eval-groups
This validates schema and runs all test cases, reporting:
- Pass/fail for each test case
- Actual framework vs. expected framework
- Safety assertion results
Interpret results
| Result | Meaning |
|---|---|
| ✅ PASS | Framework selection and safety match expectations |
| ❌ FAIL | Actual result differs from expected, such as framework or safety output |
| ⚠️ SCHEMA ERROR | JSON structure or invalid framework name |
Debug failures
If a test case fails:
- Check the assertion: Is
expect_primary_frameworkcorrect? Does it match the framework file name? - Check the source: Are the source files listed in
sourcesactually there? - Check the input: Is the test input clear? Does it trigger the expected framework?
- Verify framework logic: Has the framework file been updated recently? Does its activation logic still match?
Adding multiple related test cases
When you add a new framework or template section, add multiple test cases covering different activation scenarios:
{
"g": "New Framework, Scenario A",
"cat": "new",
"sources": ["skills/frameworks/new-framework.md"],
"items": [
{"t": "input that triggers scenario A", "expect_primary_framework": "NEW_FRAMEWORK"},
{"t": "input that triggers scenario B", "expect_primary_framework": "NEW_FRAMEWORK"},
{"t": "edge case input", "expect_primary_framework": "NEW_FRAMEWORK"}
]
}
This ensures coverage and makes it easier to debug if the framework selection logic changes.
Syntax and validation
Common errors
| Error | Fix |
|---|---|
| JSON parse error | Check for missing commas, unclosed braces, trailing commas after last item |
| Unknown framework | Verify framework name matches skills/frameworks/FRAMEWORK_NAME.md exactly |
| Missing required field | Ensure g, cat, sources, items are all present |
| File path doesn't exist | Verify all paths in sources and source_markers exist in the repo |
Duplicate cat | If consolidating groups, use the same category code for related tests |
Validate locally
After editing evals/datasets/groups.json:
# Quick JSON check
python -c "import json; json.load(open('evals/datasets/groups.json'))"
# Run full eval suite
uv run soulmap eval-groups
# Run wording sync checks
uv run soulmap eval-markdown-contracts
# Run unit tests
uv run python tests/eval_regression/test_safety_evals.py
Best practices
- One assertion per test case, keep test cases focused: each should test one clear decision
- Use clear test text, inputs should be realistic and representative of real user language
- Document with notes, explain why each test case matters in the
notefield - Source everything, if you add a test case, it should be backed by a source file
- Run evals before committing, verify all tests pass before merging
- Keep groups related, group similar test cases under the same
gandcat
Workflow
- Read
evals/README.mdto understand the current eval suite structure. - Identify the framework or safety behavior the new group is testing.
- Find the source files (in
skills/, ortemplates/for internal-only copy) that justify the test cases. - Write the group following the structure defined in this skill.
- Add
source_markersfor high-confidence slices that reference specific policy text. - Run
uv run soulmap eval-groupsand verify no existing assertions broke. - Run
uv run soulmap test -n auto -qbefore committing.
Definition of done
An eval group is done when:
- All items have a
notefield describing what is being tested - All asserted items have expectations backed by real source files in
sources source_markersare present for any high-risk or safety-critical sliceuv run soulmap eval-groupspasses for the new groupuv run soulmap test -n auto -qpasses with no regressions
Relationship to other skills
- detector-engineer writes the code that SoulMap uses to detect signals → you write evals to validate that code
- framework-author defines framework activation signals → you reference those files in
sourcesand write test cases for them - research-and-gap-analysis finds gaps in the test suite → you implement the fixes via this skill