instruction

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DeepSeekAddon = `` /* 274-byte string literal not displayed */
View Source
const GLMAddon = `` /* 276-byte string literal not displayed */
View Source
const KimiAddon = `` /* 215-byte string literal not displayed */
View Source
const QwenAddon = `` /* 200-byte string literal not displayed */
View Source
const SerialAddon = `` /* 149-byte string literal not displayed */

Variables

This section is empty.

Functions

func FamilyAddon

func FamilyAddon(family string) string

FamilyAddon returns a model-family-specific prompt nudge, or "" when the family is unknown or needs no special handling. These addons are appended after the base system prompt + thinking/serial addons (see ForModel).

Each addon targets observed failure modes:

  • qwen: tool-call format drift (mixed prose + tool args)
  • glm: parallel tool calls sometimes drop; serial is safer
  • deepseek: weak instruction following on multi-step; needs explicit sequencing
  • kimi: over-elaboration; needs conciseness guard

func ForModel

func ForModel(modelID string) string

ForModel returns a model-specific prompt addon. The base DefaultSystemPrompt is model-agnostic; this function adds targeted instructions for models that need them (e.g. serial-constraint models). Returns empty string for models that work fine with the default prompt.

Note: thinking behavior is now declared per-provider via ProviderEntry.ReasoningProtocol rather than injected as a prompt addon for a hardcoded model allowlist, so there is no thinking-protocol branch here.

func ModelFamily

func ModelFamily(modelID string) string

ModelFamily detects the vendor family from a model ID like "openai/gpt-4o" or "qwen/qwen3-max" or bare "gpt-4o".

func WithChecks

func WithChecks(ctx context.Context, checks []VerifyCheck) context.Context

Types

type VerifyCheck

type VerifyCheck struct {
	Command    string
	SourcePath string
	Line       int
}

VerifyCheck is a host-observable project check extracted from structured project memory. It is runtime-only and is not serialized into prompts.

func ExtractHostChecks

func ExtractHostChecks(docs []memory.Source) []VerifyCheck

ExtractHostChecks reads only the structured "fairpeer host checks" section. Ordinary project instructions remain guidance and do not become hard gates.

func FromContext

func FromContext(ctx context.Context) []VerifyCheck

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL