This commit is contained in:
Your Name
2026-10-08 18:03:11 +08:00
parent 4dac39c4c2
commit 19ea2dadeb
26 changed files with 1131 additions and 28 deletions
@@ -15,6 +15,34 @@ final class NihaixiaClinicalSkill
{
public const VERSION = 'nihaixia-270e94e-clinical-v1';
public const REPOSITORY_URL = 'https://github.com/coinweth/nihaixia-skill';
public const COMMIT = '270e94e637c4249dc411e54ac6715f21247de3cb';
public const SECTIONS = ['六经速查表', '六经辨证诊断公式', '七步走辨证思维模式'];
/** Public reference metadata only; never includes clinical input. */
public static function knowledgeSource(): array
{
return [
'title' => '倪海厦临床参考 Skill',
'url' => self::REPOSITORY_URL . '/blob/' . self::COMMIT . '/SKILL.md',
'commit' => self::COMMIT,
'sections' => self::SECTIONS,
];
}
/** Historical reports only claim the reference when their saved version identifies it. */
public static function knowledgeSourceForPromptVersion(string $promptVersion): ?array
{
// Pin known saved prompt versions to this exact vendored commit. A future
// skill update must add its own mapping instead of relabeling old reports.
return in_array($promptVersion, [
'patient-context-case-explain-nihaixia-v3',
'patient-longitudinal-report-nihaixia-v3',
'patient-context-case-explain-nihaixia-ancient-v4',
'patient-longitudinal-report-nihaixia-ancient-v4',
], true) ? self::knowledgeSource() : null;
}
private const MARKER = '[NIHAIXIA_CLINICAL_SKILL:' . self::VERSION . ']';
private static ?string $reference = null;