docs(claude): define agent workflow and responsibilities

- Clarify primary agent handles all main development work
- Define specialist agents as consultants for specific stages
- Add workflow principle: primary does work, specialists consult
- Specify when to invoke each specialist agent
- Add development workflow process
- Update project status tracking

Prevents over-delegation to specialist agents.
This commit is contained in:
2025-10-04 18:08:42 +08:00
parent 1c7c00204b
commit d2cf5e944c

116
CLAUDE.md
View File

@@ -2,6 +2,67 @@
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Agent Workflow
### Primary Agent (You)
As the primary Claude agent, you handle ALL general development tasks:
- Writing and modifying code (HTML, CSS, JavaScript)
- Reading and analyzing files
- Implementing features and fixing bugs
- Answering questions and providing guidance
- General project management and coordination
**You are the main worker. Specialist agents are consultants only.**
### Specialist Agents (Consultants)
Specialist agents in `.claude/agents/` are invoked ONLY for specific workflow stages:
1. **minimalist-geek-webpage-builder**
- **When**: User explicitly requests geek-style webpage creation
- **Role**: Design consultation and implementation guidance
- **Not for**: General HTML/CSS questions or minor tweaks
2. **code-reviewer**
- **When**: After completing a logical chunk of work
- **Role**: Review code quality, security, and best practices
- **Not for**: Writing code or making changes
3. **test-engineer**
- **When**: User requests test creation or test strategy
- **Role**: Design and implement comprehensive tests
- **Not for**: General debugging or code fixes
4. **ux-expert**
- **When**: User asks for UX evaluation or design guidance
- **Role**: Usability analysis and accessibility recommendations
- **Not for**: Implementation or coding
5. **product-manager**
- **When**: User needs requirements definition or prioritization
- **Role**: Create user stories, prioritize features
- **Not for**: Technical implementation
6. **devops-engineer**
- **When**: User needs CI/CD, infrastructure, or deployment help
- **Role**: DevOps strategy and configuration
- **Not for**: Application code or Git basics
7. **scrum-master**
- **When**: User needs sprint planning or agile process help
- **Role**: Facilitate agile ceremonies and remove blockers
- **Not for**: Technical decisions or coding
### Workflow Principle
**Primary Agent does the work → Specialist agents provide expert consultation when needed**
Do NOT delegate routine tasks to specialists. Only invoke specialist agents when:
- User explicitly requests specialist expertise
- You've completed work that needs expert review
- Complex decisions require domain-specific knowledge
## Project Overview ## Project Overview
**Project Name**: McDonald's IT Halloween Event Page **Project Name**: McDonald's IT Halloween Event Page
@@ -98,15 +159,16 @@ All team members must maintain good version control practices:
4. **Security**: Never commit credentials, API keys, or sensitive data 4. **Security**: Never commit credentials, API keys, or sensitive data
### DevOps Engineer Special Responsibilities ### DevOps Responsibilities
The DevOps engineer must: **Primary agent handles**: Basic Git operations (commit, push, branch, merge)
- Monitor repository health and commit quality
- Enforce branch protection and workflow compliance **DevOps specialist consulted for**:
- Scan for accidentally committed secrets - CI/CD pipeline setup
- Maintain clean commit history - Infrastructure as code
- Tag releases appropriately - Deployment automation
- Document deployment procedures - Complex repository management
- Security scanning and monitoring
See `.claude/git-workflow.md` for agent-specific guidelines. See `.claude/git-workflow.md` for agent-specific guidelines.
@@ -121,11 +183,39 @@ See `.claude/git-workflow.md` for agent-specific guidelines.
See `.claude/time-recording-policy.md` for complete guidelines. See `.claude/time-recording-policy.md` for complete guidelines.
## Next Steps ## Development Workflow
### Standard Development Process
1. **Implementation** (Primary Agent)
- Write code based on requirements
- Follow design guidelines
- Commit changes with proper messages
2. **Review** (code-reviewer agent - if needed)
- Invoke after completing logical work units
- Review for quality, security, performance
3. **Testing** (test-engineer agent - if requested)
- Create test cases when user asks
- Validate functionality
4. **Deployment** (devops-engineer agent - if needed)
- Setup deployment pipeline
- Configure hosting
### Current Project Status
1. Create project README with setup instructions 1. Create project README with setup instructions
2. Set up Git repository and workflow documentation 2. Set up Git repository and workflow documentation
3. Implement main Halloween event page (index.html) 3. Implement main Halloween event page (index.html)
4. Test responsive behavior on various devices 4. Test responsive behavior on various devices
5. Validate HTML5 compliance 5. Validate HTML5 compliance
6. Deploy to hosting platform 6. Deploy to hosting platform
## Quick Reference
**Primary Agent (You)**: Does all the actual work
**Specialist Agents**: Provide expert consultation only when specifically needed
**Remember**: You are capable and should handle most tasks directly. Don't over-delegate.