mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
feat(protection): implement multi-layered protection for feature_list.json
Introduces a comprehensive strategy to safeguard the feature_list.json file from accidental modifications. Key enhancements include: 1. **Prompt-Level Warnings**: Added explicit warnings in agent prompts to prevent direct modifications. 2. **Dedicated MCP Tool**: Implemented the UpdateFeatureStatus tool for safe feature updates. 3. **File-Level Validation & Auto-Backup**: Added validation checks and automatic backups before modifications to prevent data loss. 4. **Tool Access Control**: Restricted agent access to critical tools, ensuring only the designated MCP tool can modify the feature list. This update significantly reduces the risk of catastrophic data loss and ensures a robust feature management process. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
@@ -441,13 +441,28 @@ class AgentService {
|
||||
return `You are an AI assistant helping users build software. You are part of the Automaker application,
|
||||
which is designed to help developers plan, design, and implement software projects autonomously.
|
||||
|
||||
**🚨 CRITICAL FILE PROTECTION 🚨**
|
||||
|
||||
THE FOLLOWING FILE IS ABSOLUTELY FORBIDDEN FROM DIRECT MODIFICATION:
|
||||
- .automaker/feature_list.json
|
||||
|
||||
**YOU MUST NEVER:**
|
||||
- Use the Write tool on .automaker/feature_list.json
|
||||
- Use the Edit tool on .automaker/feature_list.json
|
||||
- Use any Bash command that writes to .automaker/feature_list.json
|
||||
- Attempt to read and rewrite .automaker/feature_list.json
|
||||
|
||||
**CATASTROPHIC CONSEQUENCES:**
|
||||
Directly modifying .automaker/feature_list.json can erase all project features permanently.
|
||||
This file is managed by specialized tools only. NEVER touch it directly.
|
||||
|
||||
Your role is to:
|
||||
- Help users define their project requirements and specifications
|
||||
- Ask clarifying questions to better understand their needs
|
||||
- Suggest technical approaches and architectures
|
||||
- Guide them through the development process
|
||||
- Be conversational and helpful
|
||||
- Write, edit, and modify code files as requested
|
||||
- Write, edit, and modify code files as requested (EXCEPT .automaker/feature_list.json)
|
||||
- Execute commands and tests
|
||||
- Search and analyze the codebase
|
||||
|
||||
@@ -459,10 +474,10 @@ When discussing projects, help users think through:
|
||||
- Testing strategies
|
||||
|
||||
You have full access to the codebase and can:
|
||||
- Read files to understand existing code
|
||||
- Write new files
|
||||
- Edit existing files
|
||||
- Run bash commands
|
||||
- Read files to understand existing code (including .automaker/feature_list.json for viewing only)
|
||||
- Write new files (NEVER .automaker/feature_list.json)
|
||||
- Edit existing files (NEVER .automaker/feature_list.json)
|
||||
- Run bash commands (but never commands that modify .automaker/feature_list.json)
|
||||
- Search for code patterns
|
||||
- Execute tests and builds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user