Documentation
¶
Overview ¶
Package prompts holds byte-identical copies of every prompt template that ships inside the Python package at src/sec_af/prompts, embedded into the Go binary.
Python reads each template lazily, at call time, from a path computed off __file__:
PROMPT_PATH = Path(__file__).resolve().parents[2] / "prompts" / "hunt" / "injection.txt" template = PROMPT_PATH.read_text(encoding="utf-8")
A missing template therefore raises FileNotFoundError inside the reasoner (a 500), not at import. The Go port embeds the same tree with //go:embed, so "missing file" is a compile-time impossibility for any name that exists — a bad name is a programmer typo. Load reports it as an error for callers that want to handle it; MustLoad panics, which is the shape agent code wants (Python's read_text would blow up just as loudly).
Relative names are exactly the Python-relative paths under src/sec_af/prompts with forward slashes, e.g. "hunt/injection.txt", "prove/verdict.txt", "remediation.txt".
The copies are verified against the Python tree by TestPromptsMatchPythonTree (prompts_test.go), which walks both trees in both directions whenever the Python source is present next to the module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load returns the prompt template stored at rel (a path relative to src/sec_af/prompts, forward-slash separated, e.g. "hunt/injection.txt").
Ports the `PROMPT_PATH.read_text(encoding="utf-8")` call every agent module performs. The bytes are returned verbatim — no trailing-newline trimming, no normalization — because prompt text reaches the LLM byte-for-byte.
Types ¶
This section is empty.