Documentation
¶
Overview ¶
Package learning implements Pando's opt-in "learner and documentarian" session mode: a per-session policy that makes the agent lean much harder on the knowledge base and memory subsystem, capture non-trivial discoveries as living documentation, actively ask the user what it needs to know, and keep existing documentation honest (updating stale docs and marking superseded ones outdated).
It mirrors the architecture of internal/superpowers, internal/caveman and internal/ponytail: the policy is delivered through the agent's existing per-turn skill injection (see internal/llm/agent.prepareProvider), so it works uniformly across the TUI, Web UI and ACP surfaces, and it composes with user/project skills and with the other session policies.
The mode is enabled with /learning and disabled with /learning-finish. State is session-scoped, ephemeral (process-bounded) and safe for concurrent sessions. There is no configured default: a session that never invoked /learning behaves exactly as before.
Index ¶
Constants ¶
const AlreadyActiveMessage = "Learning mode is already active. It stays on until /learning-finish."
AlreadyActiveMessage is the idempotent response to re-invoking /learning.
const NotActiveMessage = "Learning mode is not active. Nothing to finish — you are already in normal mode."
NotActiveMessage is the response to /learning-finish outside the mode.
Variables ¶
This section is empty.
Functions ¶
func ActivationMessage ¶
ActivationMessage is the confirmation shown when the mode is switched on. The focus, when given, is echoed back but not persisted: it only frames the confirmation.
func FinishPrompt ¶
func FinishPrompt() string
FinishPrompt returns the prompt for the closing turn run by /learning-finish. It is a normal agent turn: it consolidates what was learned into KB/memory, flags stale docs, and reports. It performs no git side effect.
func Instructions ¶
func Instructions() string
Instructions returns the learner/documentarian policy injected into the system prompt on every turn of an enabled session.
func SetEnabled ¶
SetEnabled enables or disables Learning mode for a session. It is safe for concurrent use and is the single mutation point used by every surface that exposes the /learning commands (ACP, Web UI, TUI).