assets/skills/new-feature/SKILL.md
DDD feature development workflow with phase-based checks and review loop. Use when implementing new features, building functionality, or when user says "implement feature", "add feature", "build feature", "create feature", "new feature".
npx skillsauth add phuthuycoding/moicle new-featureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build a new feature following DDD architecture, with automated checks after each phase and a review loop that keeps fixing until all checks pass.
ARGUMENTS: <domain> <feature> — e.g., wallet savings, notification broadcast, catalog products
Before starting, MUST read TWO files:
.claude/architecture/ddd-architecture.md| File | Stack Doc |
|------|-----------|
| go.mod | go-backend.md |
| package.json + vite.config.* | react-frontend.md |
| pubspec.yaml | flutter-mobile.md |
| composer.json | laravel-backend.md |
| remix.config.* | remix-fullstack.md |
.claude/architecture/{name}.md # Project-specific (priority)
~/.claude/architecture/{name}.md # Global
PHASE 1: Analyze & Plan
→ PHASE 2: Build Domain Layer
→ PHASE 3: Build Infrastructure Layer
→ PHASE 4: Build Application Layer
→ PHASE 5: Registration & Wiring
→ PHASE 6: Domain Tests
→ REVIEW LOOP (run /architect-review, fix issues, repeat until clean)
ddd-architecture.md (core DDD rules)Pick a SMALL existing module in the project as reference. Read ALL its files to understand exact patterns:
Present to user:
Create in order: value objects → entities → events → ports → usecases
valueobjects/)IsTerminal(), CanTransitionTo()entities/)events/)ports/)usecases/)Run the Domain Purity check scripts from the stack architecture doc:
# Example (Go):
go build ./internal/domain/$DOMAIN/... && echo "PASS" || echo "FAIL"
go vet ./internal/domain/$DOMAIN/... && echo "PASS" || echo "FAIL"
grep -rn {forbidden_imports} internal/domain/$DOMAIN/ && echo "FAIL" || echo "PASS"
# Example (React):
npx tsc --noEmit && echo "PASS" || echo "FAIL"
grep -rn "from 'react'" src/domain/$DOMAIN/ && echo "FAIL" || echo "PASS"
# Example (Flutter):
dart analyze lib/domain/$DOMAIN/ && echo "PASS" || echo "FAIL"
grep -rn "package:flutter" lib/domain/$DOMAIN/ && echo "FAIL" || echo "PASS"
# Build infrastructure layer
{stack_build_command_for_infra}
# Build application layer
{stack_build_command_for_application}
# Full build
{stack_full_build_command}
# Run domain tests
{stack_test_command_for_domain}
After all phases complete, run the architecture review. Keep looping until ALL checks pass.
LOOP:
1. Run /architect-review {stack} {domain}
2. Collect violations
3. IF violations with severity >= MEDIUM:
a. Fix all violations
b. Run build to verify
c. Run tests to verify
d. GOTO 1
4. IF score >= B:
BREAK → Final Report
When review loop passes:
## Feature Complete: {domain}/{feature}
### Files Created
- List all new files
### Files Modified
- List all modified files
### Endpoints/Screens (depending on stack)
| Method/Route | Description |
|-------------|-------------|
### Domain Events
| Event | Listeners |
|-------|-----------|
### Test Coverage
- X test files, Y test functions
- Areas covered: value objects, entities, usecases
### Review Status: ALL CHECKS PASS
- Build: PASS
- Lint: PASS
- Domain purity: PASS
- Tests: PASS (X/X)
- Architecture score: {A/B}
| Phase | Agent | Purpose |
|-------|-------|---------|
| PLAN | @clean-architect | Architecture design |
| IMPLEMENT | Stack-specific dev agent | Code per architecture |
| IMPLEMENT | @db-designer | Database schema |
| IMPLEMENT | @api-designer | API design |
| REVIEW | @code-reviewer | Code quality |
| REVIEW | @security-audit | Security check |
| TEST | @test-writer | Write tests |
development
Test-Driven Development workflow. Use when doing TDD, writing tests first, or when user says "tdd", "test first", "test driven", "red green refactor".
development
Thorough pull request review workflow with architecture compliance checks. Use when reviewing pull requests, checking code changes, or when user says "review pr", "check pr", "review code", "pr review", "review pull request".
development
Review local branch changes for architecture compliance, conventions, and code quality before pushing/PR. Stack-aware — detects the project stack and applies the matching rules. Use when user says "review changes", "review branch", "check branch", "check changes", "review my code", "review before pr".
testing
DDD architecture compliance review with automated checks and review loop. Use when user says "architect-review", "architecture review", "review architecture", "check architecture", "review ddd", "ddd review".