Implement new feature with self-testing loop until 100% pass
Implement a new feature and iterate until all tests pass (100% success rate).
NEVER use:
as keyword (type assertion)any type$ARGUMENTS
┌─────────────────────────────────────┐
│ Phase 1: Implementation │
│ - Controller │
│ - Provider │
│ - Collector/Transformer │
│ - Interface │
└───────────────┬─────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Phase 2: Test Design │
│ - Happy path tests │
│ - Error case tests │
│ - Edge case tests │
└───────────────┬─────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Phase 3: Test Loop │
│ while (pass_rate < 100%) { │
│ run tests │
│ analyze failures │
│ fix code │
│ } │
└───────────────┬─────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Complete │
│ All tests pass! │
└─────────────────────────────────────┘
See: flow-implement.md
Analyze Requirements
$ARGUMENTSCreate/Update Interface
Create/Update Collector
Create/Update Transformer
Create/Update Provider
Create/Update Controller
Verify Build
npm run build:main
See: flow-test-design.md
Design comprehensive test scenarios including:
See: flow-test-loop.md
REPEAT:
1. Build tests
npm run build:test
2. Run tests
npm run test -- --include "{feature}"
3. If all pass → DONE
4. If failures:
a. Analyze failure reason
b. Determine if test code issue or business logic issue
c. Fix the appropriate code
d. Go to step 1
UNTIL: 100% pass rate
✅ Success Criteria:
npm run build:main passesnpm run build:test passesnpm run test passes with 100% success rate❌ Failure (requires manual intervention):
When complete, provide:
## Feature Implementation Complete
### Summary
- Feature: {description}
- Files created/modified: X
- Test scenarios: Y
- Pass rate: 100%
### Files Changed
- src/api/structures/I{Entity}.ts
- src/controllers/{path}/{Controller}.ts
- src/providers/{provider}.ts
- src/collectors/{Collector}.ts
- src/transformers/{Transformer}.ts
- test/prepare/prepare_random_{entity}.ts
- test/generate/generate_random_{entity}.ts
- test/features/api/{entity}/*.ts
### Test Results
- Total: X tests
- Passed: X
- Failed: 0
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer