Skills.MD
# IMPLEMENT MODE: Task Execution with Mandatory Context Gathering
> **WARNING: DO NOT use the Task tool with any subagent_type (Explore, Plan, general-purpose).**
> Perform ALL exploration and implementation yourself using direct tool calls (Read, Grep, Glob, MCP tools).
> Sub-agents lose context and make implementation inconsistent.
## Quality Over Speed - CRITICAL
**NEVER rush or compromise quality due to context pressure.**
- Context warnings are informational, not emergencies
- Work spans sessions seamlessly via plan file and continuation mechanisms
- Finish the CURRENT task with full quality, then hand off cleanly
- Do NOT skip tests, compress code, or cut corners to "beat" context limits
- **Quality is the #1 metric** - a well-done task split across sessions beats rushed work
**Execute tasks continuously with full quality. Hand off cleanly when context is high.**
## Feedback Loop Awareness
**This skill may be called multiple times in a feedback loop:**
```
/implement → /verify → issues found → /implement → /verify → ... → VERIFIED
```
**When called after /verify found issues:**
1. Read the plan - /verify will have added fix tasks (marked with `[MISSING]` or similar)
2. Check the `Iterations` field in the plan header
3. **Report iteration start:** "🔄 Starting Iteration N implementation..."
4. Focus on uncompleted tasks `[ ]` - these are the fixes needed
5. Complete all fix tasks, then set status to COMPLETE as normal
**The loop continues automatically until all checks pass (VERIFIED) or context hits 90%.**
## ⛔ CRITICAL: Task Completion Tracking is MANDATORY
**After completing EACH task, you MUST:**
1. **IMMEDIATELY edit the plan file** to change `[ ]` to `[x]` for that task
2. **Update the Progress Tracking counts** (Completed/Remaining)
3. **DO NOT proceed to next task** until the checkbox is updated
**This is NON-NEGOTIABLE. If you skip this step:**
- The rules supervisor will detect incomplete task tracking
- Verification will fail
- You will need to re-implement
**Example - After completing Task 5:**
```
Edit the plan file:
- [ ] Task 5: Implement X → - [x] Task 5: Implement X
Update counts:
**Completed:** 4 | **Remaining:** 8 → **Completed:** 5 | **Remaining:** 7
```
## Mandatory Context Gathering Phase (REQUIRED)
**Before ANY implementation, you MUST:**
1. **Read the COMPLETE plan** - Understanding overall architecture and design
2. **Verify comprehension** - Summarize what you learned to demonstrate understanding
3. **Identify dependencies** - List files, functions, classes that need modification
4. **Check current state:**
- Git status: `git status --short` and `git diff --name-only`
- Plan progress: Check for `[x]` completed tasks
### 🔧 Tools for Implementation
**Use these tools throughout implementation:**
| Tool | When to Use | Example |
|------|-------------|---------|
| **Context7** | Library API lookup | `resolve-library-id(query="how to use fixtures", libraryName="pytest")` then `query-docs(libraryId, query)` |
| **mcp-cli** | Custom MCP servers | Use `mcp-cli <server>/<tool> '<json>'` for servers in `mcp_servers.json` |
**Context7 requires descriptive queries for both tools - see `context7-docs.md` for full docs.**
**Before starting, verify Vexor is available for semantic search:**
```bash
vexor --version
```
**During implementation:**
- Use `vexor search "query" --mode code` to find similar implementations and patterns
- Use Context7 when unsure about library/framework APIs: `resolve-library-id(query="your question", libraryName="lib")` then `query-docs(libraryId, query="specific question")` - descriptive queries required
## ⚠️ CRITICAL: Migration/Refactoring Tasks
**When the plan involves replacing existing code, perform these ADDITIONAL checks:**
### Before Starting Implementation
1. **Locate the Feature Inventory section** in the plan
2. **If Feature Inventory is MISSING** - STOP and inform user:
```
"This migration plan is missing a Feature Inventory section.
Without it, features may be accidentally omitted.
Please run `/plan` again to add the inventory, or manually add it to the plan."
```
3. **Verify ALL features are mapped** - Every row must have a Task #
4. **Read the OLD code completely** - Don't rely on the plan alone
### During Implementation
For EACH task that migrates old functionality:
1. **Read the corresponding old file(s)** listed in Feature Inventory
2. **Create a checklist** of functions/behaviors from old code
3. **Verify each function/behavior exists** in new code after implementation
4. **Test with same inputs** - Old and new code should produce same outputs
### Before Marking Task Complete
**For migration tasks, add this to Definition of Done:**
- [ ] All functions from old code have equivalents in new code
- [ ] Behavior matches old code (same inputs → same outputs)
- [ ] No features accidentally omitted
### Red Flags - STOP Implementation
If you notice ANY of these, STOP and report to user:
- Feature Inventory section missing from plan
- Old file has functions not mentioned in any task
- "Out of Scope" items that should actually be migrated
- Tests pass but functionality is missing compared to old code
## TDD is MANDATORY
**No production code without a failing test first.** Follow the TDD rules in your context.
| Requires TDD | Skip TDD |
|--------------|----------|
| New functions/methods | Documentation changes |
| API endpoints | Config file updates |
| Business logic | IaC code (CDK, Terraform, Pulumi) |
| Bug fixes | Formatting/style changes |
**The TDD enforcer hook will warn you if you skip this.**
## Per-Task Execution Flow
**For EVERY task, follow this exact sequence:**
1. **READ PLAN'S IMPLEMENTATION STEPS** - List all files to create/modify/delete
2. **Perform Call Chain Analysis:**
- **Trace Upwards (Callers):** Identify what calls the code you're modifying
- **Trace Downwards (Callees):** Identify what the modified code calls
- **Side Effects:** Check for database, cache, external system impacts
3. **Mark task as in_progress** in TodoWrite
4. **Execute TDD Flow (RED → GREEN → REFACTOR):**
- Write failing test first, **verify it fails**
- Implement minimal code to pass
- Refactor if needed (keep tests green)
5. **Verify tests pass** - `uv run pytest tests/path/to/test.py -v`
6. **Run actual program** - Show real output with sample data
7. **Check diagnostics** - Must be zero errors - `mcp__ide__getDiagnostics()`
8. **Validate Definition of Done** - Check all criteria from plan
9. **Mark task completed** in TodoWrite
### ⛔ STEP 10 IS MANDATORY - DO NOT SKIP
10. **UPDATE PLAN FILE IMMEDIATELY:**
```
Use Edit tool to change in the plan file:
- [ ] Task N: ... → - [x] Task N: ...
Also update Progress Tracking section:
**Completed:** X | **Remaining:** Y
```
**You MUST do this BEFORE proceeding to the next task.**
**Failure to update = incomplete implementation.**
11. **Check context usage** - Run `$PWD/.claude/bin/ccp check-context --json`
## Critical Task Rules
**⚠️ NEVER SKIP TASKS:**
- EVERY task MUST be fully implemented
- NO exceptions for "MVP scope" or complexity
- If blocked: STOP and report specific blockers
- NEVER mark complete without doing the work
## Verification Checklist
Before marking complete:
- [ ] Test written and FAILED (RED phase)
- [ ] Implementation written
- [ ] Test PASSES (GREEN phase)
- [ ] Program executed with verified output
- [ ] No diagnostics errors
## When All Tasks Complete
**⚠️ CRITICAL: Follow these steps exactly:**
1. Quick verification: `mcp__ide__getDiagnostics()` and `uv run pytest`
2. **FOR MIGRATIONS ONLY - Feature Parity Check:**
- Run the NEW code and verify it produces expected output
- Compare behavior with OLD code (if still available)
- Check Feature Inventory - every feature should now be implemented
- If ANY feature is missing: **DO NOT mark complete** - add tasks for missing features
3. **MANDATORY: Update plan status to COMPLETE**
```
Edit the plan file and change the Status line:
Status: PENDING → Status: COMPLETE
```
4. Inform user: "✅ All tasks complete. Proceeding to verification..."
5. **The /spec workflow will automatically continue to /verify** - do not tell user to run another command
### Migration Completion Checklist
**For migration/refactoring tasks, verify before marking COMPLETE:**
- [ ] All tests pass
- [ ] New code runs without errors
- [ ] Feature Inventory shows all features mapped to completed tasks
- [ ] Old code functionality is replicated in new code
- [ ] "Out of Scope" items were intentional removals (user confirmed), not forgotten migrations
**If you cannot check ALL boxes, the migration is INCOMPLETE. Add new tasks.**
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「implement」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次