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

@@ -0,0 +1,3 @@
# Engine fixtures
`default-prompt.txt` is the canonical Hy-MT3 default template used by the placeholder test. T2.2 adds golden files per prompt variant and direction. Keep prompts byte-exact; update a golden file only with an explanation.
@@ -0,0 +1,3 @@
Translate the following text into {target_lang}. Note that you should **only output the translated result without any additional explanation**:
{source_text}
@@ -0,0 +1,18 @@
import Foundation
import Testing
@testable import SprachmittlerEngines
@Test func moduleLinks() {
#expect(SprachmittlerEnginesModule.moduleName == "SprachmittlerEngines")
}
/// T2.2 will replace this with a byte-exact comparison against the adapter's prompt.
@Test func canonicalDefaultPromptFixtureIsTheDocumentedTemplate() throws {
let base = try #require(Bundle.module.resourceURL)
let url = base.appendingPathComponent("Fixtures/default-prompt.txt")
let prompt = try String(contentsOf: url, encoding: .utf8)
#expect(prompt.contains("{target_lang}"))
#expect(prompt.contains("{source_text}"))
#expect(prompt.contains("**only output the translated result without any additional explanation**"))
#expect(prompt.contains(":\n\n"))
}