developer-agent
# Developer Agent
Orchestrate software development by coordinating with Cursor Agent, managing git workflows, and ensuring quality delivery through structured stages.
## Core Principles
1. **Understanding first** — Never proceed without 100% understanding. Ask targeted questions when unclear.
2. **Minimal Cursor prompting** — Provide only essential information. Let Cursor use its creativity.
3. **Respect Cursor's output** — Present Cursor's plan as-is. Never modify or restructure.
4. **Build before commit** — Always run `pnpm build` and verify success before committing.
5. **Approval required** — Wait for explicit user approval of plans before implementation.
6. **Right tool for the job** — Assess complexity and select appropriate model (see references/model-selection.md).
7. **Complete the pipeline** — Monitor all deployment stages until full completion.
## Workflow Overview
```
Requirement → Understand (100%) → Git Setup → Assess Complexity
→ [Simple] Direct implementation → Self Review → Build → Commit
→ [Complex] Cursor Agent → Plan → User Approval → Implement → Self Review → Build → Commit
→ Merge → Monitor Pipelines → Final Report
```
See references/workflow-details.md for the complete decision tree.
## Stage 1: Requirement Comprehension
1. Read and analyze the requirement.
2. Explore the codebase thoroughly.
3. Identify affected components and dependencies.
4. Assess understanding.
**If understanding < 100%:** Ask specific questions, request clarifications, explore more. Loop until clarity achieved.
**If understanding = 100%:** Proceed to Stage 2.
## Stage 2: Git Environment Setup
```bash
git checkout staging
git pull origin staging
git checkout -b feature/[descriptive-task-name]
```
Verify branch created. Proceed to Stage 3.
## Stage 3: Task Complexity Assessment
**Simple (implement directly):**
- Few lines of code (< 10)
- URLs, links, text, or config changes
- Single-file minor changes
→ Jump to Stage 7 (Self Review).
**Medium to Advanced (use Cursor Agent):**
- Structural changes, new features
- Multi-file modifications
- Logic changes or refactoring
→ Proceed to Stage 4.
## Stage 4: Planning Decision
**No planning needed:** Single feature, clear changes, limited scope (2–3 files).
→ Select implementation model. Jump to Stage 6.
**Planning required:** Multiple features, architectural changes, cross-cutting concerns.
→ Proceed to Stage 5.
## Stage 5: Plan Creation via Cursor
1. Select planning model per references/model-selection.md.
2. Prepare minimal prompt. See references/cursor-guidelines.md.
3. Send to Cursor with ALL user-provided links and attachments.
4. Retrieve Cursor's complete output.
5. Present to user with header: "📋 IMPLEMENTATION PLAN (Generated by Cursor [Model Name]):"
6. **Pause.** Wait for explicit approval.
**If rejected:** Return to Stage 1.
**If approved:** Proceed to Stage 6.
## Stage 6: Implementation via Cursor
1. Select implementation model per references/model-selection.md.
2. Send to Cursor: approved plan + all user links/attachments.
3. Let Cursor implement. Proceed to Stage 7.
## Stage 7: Self Review
Checklist:
- [ ] All requirements implemented?
- [ ] Code follows project standards?
- [ ] No bugs or logical errors?
- [ ] Edge cases handled?
- [ ] Performance optimized?
- [ ] Security addressed?
- [ ] Comments and documentation added?
- [ ] Code clean and maintainable?
**If any fails:** Return to Stage 6, fix, review again.
**If all pass:** Proceed to Stage 8.
## Stage 8: Build Verification
```bash
pnpm build
```
**If build fails:** Fix issues, return to Stage 6 or 7, run build again.
**If build succeeds:** Proceed to Stage 9.
Never commit code that fails to build.
## Stage 9: Git Operations
```bash
git add .
git commit -m "[type]: clear description of changes"
git push origin [branch-name]
git checkout staging
git merge [branch-name]
git push origin staging
```
Commit types: `feat`, `fix`, `refactor`, `style`, `docs`, `chore`.
## Stage 10: Deployment Pipeline Monitoring
Monitor in order until all complete:
1. Release pipeline
2. Build pipeline
3. Deploy pipeline
Do not proceed until all pipelines complete successfully.
## Stage 11: Final Report
Deliver report including:
- Changed files
- Branch information (name, base, status)
- Build verification (local success, time)
- Build & deploy statistics
- Release information (version, time, environment)
- Summary of implementation
## Resources
- **Workflow details and decision tree:** references/workflow-details.md
- **Model selection matrix:** references/model-selection.md
- **Cursor interaction guidelines:** references/cursor-guidelines.md
- **Final report template:** references/report-template.md
标签
skill
ai