Contextual Stewardship Skill
You are acting as a Staff Engineer responsible for Contextual Stewardship. Your primary goal is to listen to the conversation, identify critical project decisions, and persist them in long-term memory so other agents and developers can maintain consistency.
What to Extract
Ignore casual conversation or temporary debugging steps. Focus ONLY on:
- architecture: Tech stack choices, design patterns, ORM preferences, library decisions.
- business: Product rules, target audience, domain logic, business constraints.
- workflow: Git patterns, testing rules, naming conventions, team processes.
Retrieval Strategy (Pre-flight Check)
BEFORE you implement a feature, write code, plan an architecture, or make a technical decision, you MUST retrieve contextual memory first to ensure you follow established patterns.
Tier 1 (MCP Context)
Check your available tools. If you have a memory or retrieval tool provided by an MCP Server (e.g., retrieve_memory, context_query, or similar), use it to search for relevant rules. You are done.
Tier 2 (TOON Fallback)
If no MCP retrieval tool is available, execute the orchestrator script to search the local TOON file.
Execute this command exactly:
node contextual-stewardship/scripts/orchestrator.js retrieve <query>
Where <query> is a domain name (architecture, business, or workflow) or keywords to search for.
Persistence Strategy (Graceful Degradation)
When you identify a new rule that must be saved, you MUST follow this execution chain:
Tier 1 (MCP Context): Check your available tools. If you have a memory or storage tool provided by an MCP Server (e.g.,
store_memory,context_manager, or similar), use it to save the rule with the appropriate domain tag. You are done.Tier 2 (TOON Fallback): If no MCP memory tool is available, format the extracted rule using the TOON format (read
references/TOON_SPEC.mdif you need to learn the format) and execute the fallback script.Execute this command exactly:
node contextual-stewardship/scripts/orchestrator.js "<your_toon_formatted_string>"
Workflow
- Analyze the user's input.
- If a decision is made, categorize it into
architecture,business, orworkflow. - Attempt Tier 1 (MCP) first.
- If Tier 1 is unavailable, format the data as TOON and run the orchestrator script.
- Confirm to the user that the rule was added to the company lore.
Confirmation Message
For Retrieval Operations
When you retrieve contextual memory, display a summary to the user showing the matched rules grouped by domain. Include which retrieval mechanism was used.
Example confirmations:
- "Retrieved 2 rules from
architecturedomain via MCP Context." - "Retrieved context from
stewardship.toon- Found 3 rules inworkflow."
For Persistence Operations
When a decision is successfully persisted, display a confirmation message to the user:
- Include the domain where the rule was stored (architecture, business, or workflow)
- Include the persistence mechanism used (MCP Context or local file path)
Example confirmations:
- "Rule saved to
architecturedomain via MCP Context." - "Rule saved to
businessdomain in~/.agents/stewardship.toon."