diff --git a/.opencode/agents/fidelity.md b/.opencode/agents/fidelity.md index df029c1..758f4e2 100644 --- a/.opencode/agents/fidelity.md +++ b/.opencode/agents/fidelity.md @@ -25,6 +25,9 @@ Behavior rules: - Daily notes should include `focus`, `work-items`, and `blockers` when those values are clear. - Before answering a prompt that depends on current state, verify the latest relevant files instead of relying only on conversation history. - If the prompt asks for the latest Mattermost message, the last message from Jeff/current manager, or what someone just said, force a Mattermost refresh before answering and do not rely on stale inbox context. +- For learning-style questions, answer from known context and verified facts only; explicitly label unknowns, assumptions, and inferences. +- If missing context materially affects the answer, ask a concise clarification question instead of inventing details. +- If the user corrects or teaches the agent during a learning session, update the smallest correct canonical file or behavior surface so future sessions benefit. - For any meaningful prompt, decide whether the interaction adds, corrects, or sharpens project memory. - When the user provides new durable information, update the right workspace files before or while answering. - When the user corrects how the workspace should behave, update the linked operational surface too: commands in `.opencode/commands/`, prompt templates in `prompts/`, agent rules in `AGENTS.md` or `.opencode/agents/`, skills in `.opencode/skills/`, and vault process rules in `vault/03-context/process/` when those files control the behavior. diff --git a/.opencode/agents/workspace.md b/.opencode/agents/workspace.md index 571eec8..377e38b 100644 --- a/.opencode/agents/workspace.md +++ b/.opencode/agents/workspace.md @@ -19,6 +19,8 @@ Behavior rules: - Keep Obsidian Bases clean by excluding templates and typing role maps separately from people. - When updating canonical vault notes, maintain relationship metadata and `updated` fields so the vault remains useful to both humans and agents. - Before answering current-state questions, inspect current state, active work items, recent logs, and inbox evidence when available. +- For learning-style questions, answer only from known context and verified facts, label assumptions and unknowns, and ask concise clarification questions when guessing would be misleading. +- Treat user corrections during learning sessions as high-value input and update the smallest correct canonical file or behavior surface when the learning should persist. - For any meaningful prompt, decide whether it adds, corrects, or invalidates memory. - Update the smallest correct canonical file when memory should change. - Use the memory interface to create new typed notes and inspect vault health, then edit Markdown directly for precise curation. diff --git a/.opencode/commands/sync-context.md b/.opencode/commands/sync-context.md index 8ee854b..e2d8663 100644 --- a/.opencode/commands/sync-context.md +++ b/.opencode/commands/sync-context.md @@ -29,6 +29,8 @@ $ARGUMENTS Instructions: - use `workspace-memory-curation` when available +- Treat direct user corrections and learning-session updates as memory sources. +- If the new information corrects the agent's uncertainty handling or recurring behavior, update the command, prompt, agent, skill, or process rule that controls that behavior. - Decide whether the new information belongs in: - today's daily note: `vault/06-daily/$(date +%F).md` - current work: `vault/01-current/current-work.md` diff --git a/AGENTS.md b/AGENTS.md index 473a4ff..d25f5eb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -46,6 +46,9 @@ These are also loaded through `opencode.json`. - If `ai/inbox/mattermost-latest.md` exists, inspect it for fresher communication context before answering standup, status, or manager-message prompts. - If the user asks for the latest/last/recent Mattermost message, the latest message from Jeff/current manager, or what someone just said, synchronize Mattermost first instead of relying on existing inbox context. - If automatic refresh is uncertain, use the explicit latest-message flow: run the Mattermost sync command, then answer from the refreshed inbox only. +- For learning-style questions, answer from known context and verified facts only; label unknowns, assumptions, and inferences instead of inventing missing details. +- Ask a concise clarification question when missing context materially changes the answer. +- If the user corrects or teaches the agent during a learning session, update the smallest correct canonical file or behavior surface when that learning should persist. - For any meaningful prompt, decide whether the interaction introduces or corrects project memory. - If a sync command, extraction script, or inbox refresh fails, do not update logs, state, or context files from that failed attempt. - Treat sync failures as operational errors, not project context. diff --git a/core/memory/operational-memory.md b/core/memory/operational-memory.md index 21b63fe..80eeebb 100644 --- a/core/memory/operational-memory.md +++ b/core/memory/operational-memory.md @@ -112,6 +112,29 @@ If confidence is mixed, prefer the daily log and preserve uncertainty. --- +## Learning Session Rules + +A learning session is any interaction where the user asks the agent to explain, reason about, or improve understanding of a topic and may then correct or extend the answer. + +The agent should: + +- answer from known workspace context and verified sources only +- explicitly separate known facts, reasonable inferences, and unknowns +- avoid inventing missing context, names, tickets, implementation details, or causal explanations +- ask a concise clarification question when the missing information materially affects the answer +- provide a partial answer when useful, clearly labeling assumptions and uncertainty +- treat user corrections as high-value learning input +- update the smallest correct canonical file when the correction changes future behavior or project understanding +- avoid turning every answer into memory; promote only reusable or project-relevant learning + +When the user is teaching the agent how to behave, update `tooling-behavior`. + +When the user is teaching project/domain facts, update the relevant `state`, `work-items`, `stable-context`, `people`, or `decisions` file. + +When the user is exploring an uncertain topic without confirming facts, keep the uncertainty in the answer and do not promote it as truth. + +--- + ## Correction Rules When new information supersedes old memory: diff --git a/vault/03-context/process/agent-memory-rules.md b/vault/03-context/process/agent-memory-rules.md index 8444113..1314086 100644 --- a/vault/03-context/process/agent-memory-rules.md +++ b/vault/03-context/process/agent-memory-rules.md @@ -32,6 +32,32 @@ The agent should not wait for a separate promotion command when the right update --- +## Learning Sessions + +The agent should support incremental self-learning sessions. + +When the user asks a question, the agent may answer from existing context, but must not invent missing facts. + +The agent should: + +- say what is known from the workspace +- say what is unclear or not available +- label assumptions and inferences explicitly +- ask a concise clarification question when the missing context materially changes the answer +- learn from user corrections or confirmations by updating the smallest correct canonical file +- avoid promoting unconfirmed exploration as durable truth + +Good learning behavior: + +- If the answer is clear from stored context, answer directly and update nothing unless the interaction adds durable context. +- If the answer is partly clear, answer the known part, state the gap, and ask for the missing detail. +- If the user corrects the answer, update the stale memory or behavior rule directly. +- If the user teaches a reusable workflow preference, update the relevant command, prompt, skill, agent rule, or process note. + +Do not ask for clarification just to avoid work. Ask only when the missing context is material or when guessing would create misleading memory. + +--- + ## What Counts As Memory-Worthy Capture information automatically when it is: @@ -49,6 +75,7 @@ Examples: - approved manager guidance that changes work direction - confirmed version, dependency, or rollout facts tied to current work - corrections to previously stored project context +- corrections to the agent's answer quality, uncertainty handling, or learning behavior - repeated named people with stable roles or communication relevance - repeated named people with multi-channel, multi-year, or high-signal technical/process involvement even when the exact formal role is still unknown