mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-11 17:10:38 -10:00
Problem: verbose standing instructions and truncated skill catalogs obscure relevant guidance. Root cause: task-specific procedures entered shared context, catalogs clipped entries, and the built-in guide exposed all diagnostics together. Fix: keep concise task routing, preserve whole catalog entries with discovery hints, and load embedded references through read_skill. Refresh outdated development guidance and intentional prompt goldens. Verification: go test ./...; make lint; Markdown link checks; discovery, reference isolation, and stable provider-prefix regression tests. No live-model A/B was performed.
22 lines
717 B
Go
22 lines
717 B
Go
package skill
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"reasonix/internal/skill/builtincontent"
|
|
)
|
|
|
|
func renderEmbeddedReference(sk Skill, reference string) (string, error) {
|
|
if sk.Scope != ScopeBuiltin || !strings.HasPrefix(sk.Path, "(builtin:") ||
|
|
!strings.HasSuffix(sk.Path, ")") {
|
|
return "", fmt.Errorf("skill %q has no embedded references; use its source files for file-backed references", sk.Name)
|
|
}
|
|
source := strings.TrimSuffix(strings.TrimPrefix(sk.Path, "(builtin:"), ")")
|
|
body, err := builtincontent.ReadReference(source, reference)
|
|
if err != nil {
|
|
return "", fmt.Errorf("read_skill reference %q: %w", reference, err)
|
|
}
|
|
return fmt.Sprintf("# Skill reference: %s/%s\n\n%s", sk.Name, reference, body), nil
|
|
}
|