chore: Sprachmittler OpenCode starter kit

This commit is contained in:
schihei committed 2026-11-26 11:59:38 +01:00
commit 374085ec2f
94 files changed
+4563

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# Evaluation
The default model and sampling are chosen by measurement, not by reputation (ADR-008). The method is in `docs/MODEL_EVALUATION.md`; the agent workflow is `/evaluate` with the `translation-evaluator` agent and the `translation-quality` skill.
| Path | In git | Content |
|---|---|---|
| `corpus.schema.json` | yes | JSON Schema (draft 2020-12) for the manifest |
| `corpus.example.json` | yes | Example manifest that points at the synthetic test fixtures |
| `corpus.json` | no (create it) | Your manifest; copy the example and edit |
| `corpus/` | no (git-ignored, agents denied) | Your texts and human reference translations |
| `results/<ISO date>/<model-slug>/` | no (git-ignored) | Raw outputs, metrics, `report.md`, `report.json` |
Rules:
- Use only texts you are allowed to process. Prefer public material or your own.
- References of kind `human` are the ground truth. Public translations are marked `public` and reported separately.
- Cover every category you care about with at least four segments; EN↔DE is mandatory because it is the owner's main pair.
- Run `sprachmittler-cli eval --manifest evaluation/corpus.json --models <tags> --target <code> --out evaluation/results/$(date +%F)` once M7 is done.
- Never commit private texts or their outputs.
+46
View File
@@ -0,0 +1,46 @@
{
"version": 1,
"description": "Example manifest using the synthetic test fixtures. Copy to corpus.json, replace the paths with your own texts under corpus/, and write the reference translations.",
"segments": [
{
"id": "synthetic-en-p1",
"source": "../Packages/SprachmittlerKit/Tests/SprachmittlerTextTests/Fixtures/en-sample.txt",
"sourceLanguage": "en",
"targetLanguage": "de",
"category": "en-de-prose",
"reference": "corpus/references/synthetic-en-p1.de.txt",
"referenceKind": "human",
"notes": "Synthetic; URL and {{limit}} must survive"
},
{
"id": "synthetic-de-p1",
"source": "../Packages/SprachmittlerKit/Tests/SprachmittlerTextTests/Fixtures/de-sample.txt",
"sourceLanguage": "de",
"targetLanguage": "en",
"category": "de-en-prose",
"reference": "corpus/references/synthetic-de-p1.en.txt",
"referenceKind": "human",
"notes": "Synthetic; umlauts, ß, comma decimal"
},
{
"id": "synthetic-markdown-p1",
"source": "../Packages/SprachmittlerKit/Tests/SprachmittlerTextTests/Fixtures/markdown-sample.md",
"sourceLanguage": "en",
"targetLanguage": "de",
"category": "markdown",
"reference": "corpus/references/synthetic-markdown-p1.de.md",
"referenceKind": "human",
"notes": "Synthetic; heading, bold, code span, link"
},
{
"id": "synthetic-placeholders-p1",
"source": "../Packages/SprachmittlerKit/Tests/SprachmittlerTextTests/Fixtures/placeholders.txt",
"sourceLanguage": "en",
"targetLanguage": "de",
"category": "placeholders",
"reference": "corpus/references/synthetic-placeholders-p1.de.txt",
"referenceKind": "human",
"notes": "Synthetic; {{name}}, ${code}, %s, %d, e-mail, URL"
}
]
}
+36
View File
@@ -0,0 +1,36 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sprachmittler.local/evaluation/corpus.schema.json",
"title": "Sprachmittler evaluation corpus manifest",
"type": "object",
"required": ["version", "segments"],
"additionalProperties": false,
"properties": {
"version": { "const": 1 },
"description": { "type": "string" },
"segments": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/segment" }
}
},
"$defs": {
"segment": {
"type": "object",
"required": ["id", "source", "sourceLanguage", "targetLanguage", "category", "reference", "referenceKind"],
"additionalProperties": false,
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{1,63}$", "description": "Unique, stable identifier" },
"source": { "type": "string", "minLength": 1, "description": "Path to the source text, relative to the manifest" },
"sourceLanguage": { "type": "string", "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$" },
"targetLanguage": { "type": "string", "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$" },
"category": {
"enum": ["en-de-prose", "de-en-prose", "technical", "legal", "ui", "markdown", "json", "placeholders", "numbers", "idioms", "long", "cjk", "rtl"]
},
"reference": { "type": "string", "minLength": 1, "description": "Path to the reference translation, relative to the manifest" },
"referenceKind": { "enum": ["human", "public"] },
"notes": { "type": "string" }
}
}
}
}
+11
View File
@@ -0,0 +1,11 @@
# Evaluation results
Reports are written under `evaluation/results/<ISO date>/<model-slug>/` and are git-ignored. This file keeps the folder in git.
Each run should contain:
- `report.md` and `report.json`
- raw translations per segment
- `corrections.csv`, if the user recorded correction minutes
Never commit private source texts or their translations.