feat: Enhance learning session rules and memory update processes for improved agent accuracy and user interaction
This commit is contained in:
@@ -25,6 +25,9 @@ Behavior rules:
|
|||||||
- Daily notes should include `focus`, `work-items`, and `blockers` when those values are clear.
|
- 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.
|
- 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.
|
- 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.
|
- 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 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.
|
- 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.
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ Behavior rules:
|
|||||||
- Keep Obsidian Bases clean by excluding templates and typing role maps separately from people.
|
- 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.
|
- 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.
|
- 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.
|
- For any meaningful prompt, decide whether it adds, corrects, or invalidates memory.
|
||||||
- Update the smallest correct canonical file when memory should change.
|
- 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.
|
- Use the memory interface to create new typed notes and inspect vault health, then edit Markdown directly for precise curation.
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ $ARGUMENTS
|
|||||||
Instructions:
|
Instructions:
|
||||||
|
|
||||||
- use `workspace-memory-curation` when available
|
- 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:
|
- Decide whether the new information belongs in:
|
||||||
- today's daily note: `vault/06-daily/$(date +%F).md`
|
- today's daily note: `vault/06-daily/$(date +%F).md`
|
||||||
- current work: `vault/01-current/current-work.md`
|
- current work: `vault/01-current/current-work.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 `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 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.
|
- 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.
|
- 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.
|
- 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.
|
- Treat sync failures as operational errors, not project context.
|
||||||
|
|||||||
@@ -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
|
## Correction Rules
|
||||||
|
|
||||||
When new information supersedes old memory:
|
When new information supersedes old memory:
|
||||||
|
|||||||
@@ -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
|
## What Counts As Memory-Worthy
|
||||||
|
|
||||||
Capture information automatically when it is:
|
Capture information automatically when it is:
|
||||||
@@ -49,6 +75,7 @@ Examples:
|
|||||||
- approved manager guidance that changes work direction
|
- approved manager guidance that changes work direction
|
||||||
- confirmed version, dependency, or rollout facts tied to current work
|
- confirmed version, dependency, or rollout facts tied to current work
|
||||||
- corrections to previously stored project context
|
- 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 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
|
- repeated named people with multi-channel, multi-year, or high-signal technical/process involvement even when the exact formal role is still unknown
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user