Simplify MCP instructions: remove workflow coaching, trust AI's local tools
This commit is contained in:
parent
a23ae2c4e0
commit
63f41c318a
1 changed files with 11 additions and 31 deletions
|
|
@ -3,41 +3,21 @@ import httpx
|
|||
import os
|
||||
import uvicorn
|
||||
|
||||
MCP_INSTRUCTIONS = """You are a coding assistant with a shared knowledge base (skills) and project memory.
|
||||
MCP_INSTRUCTIONS = """You have access to a shared knowledge base (skills) and project memory via these tools:
|
||||
|
||||
Your capabilities:
|
||||
- Fetch relevant skills and project conventions using get_context(project) before each query
|
||||
- Search for skills using search_skills(query)
|
||||
- Store decisions and learnings using add_memory(project, key, content)
|
||||
- Create reusable patterns using create_skill(id, name, content, ...)
|
||||
- Retrieve project memory using get_memory(project)
|
||||
- get_context(project): Fetch relevant skills and project conventions for the given project identifier. Always call this before answering to load relevant context.
|
||||
- search_skills(query): Find skills by content/tags.
|
||||
- get_memory(project): Retrieve past decisions/learnings for a project.
|
||||
- add_memory(project, key, content): Store a decision or learning. ASK permission first.
|
||||
- create_skill(id, name, content, ...): Create a reusable skill. ASK permission first.
|
||||
|
||||
CRITICAL: You get better over time, but you must ASK before creating new entries.
|
||||
CRITICAL: When you identify an opportunity to store something (a decision, pattern, convention), you MUST propose it and get explicit user confirmation before calling add_memory or create_skill. Examples:
|
||||
- "I decided to use PostgreSQL. Want me to save that to memory?"
|
||||
- "That's a useful pattern. I could create a reusable skill for it. Should I?"
|
||||
|
||||
When you identify an opportunity to learn:
|
||||
1. **Recognize**: You've made a decision, discovered a pattern, or learned something project-specific
|
||||
2. **Propose**: Say "I can create a skill/memory for this" and explain what it would contain
|
||||
3. **Await confirmation**: Wait for user to say "yes" or "create it" before calling the tool
|
||||
4. **Execute**: Only after explicit permission, call add_memory() or create_skill()
|
||||
Project conventions are scoped to a project identifier (recommended: git remote origin URL like https://github.com/username/repo). This ensures your knowledge follows you across machines. Use your shell tool to detect the git remote locally: `git remote get-url origin`.
|
||||
|
||||
Examples:
|
||||
- "I decided to use PostgreSQL for this project. Want me to save that to memory?"
|
||||
- "That's a useful Docker Compose pattern. I could create a reusable skill for it. Should I?"
|
||||
- "This seems like a project-specific convention. Want me to record it as a convention?"
|
||||
|
||||
This respects user control while still building the knowledge base.
|
||||
|
||||
**Project identification**: At the start of each session, ask the user: "What is your project identifier? Use the git remote origin URL if available (e.g., https://github.com/username/repo) for cross-machine consistency. If not a git repo, use a unique name." Store this identifier and use it for all subsequent `project` parameters in get_context, add_memory, create_skill, etc.
|
||||
|
||||
If the user doesn't know their git remote, instruct them to run locally: `git remote get-url origin`
|
||||
|
||||
If they need to initialize a git repo or set up a new project with AI Skills, guide them to the "Project Setup Guide" skill (search for it) or have them clone the agentic-templates repository.
|
||||
|
||||
Project conventions are scoped to this project identifier, not filesystem path. This ensures your knowledge follows you across machines.
|
||||
|
||||
Start every coding session by calling get_context(project) to load what you already know about this project.
|
||||
|
||||
Never create skills/memories silently. Always propose and get explicit confirmation."""
|
||||
Always pass the same project identifier consistently across sessions."""
|
||||
|
||||
mcp = FastMCP("skills", instructions=MCP_INSTRUCTIONS)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue