xiaohongshu
xiaohongshu
domain-review-before-implementation
BEFORE dispatching any implementation agent or starting to code - if you're about to write "Task(subagent_type=..., prompt=...)" for implementation, or about to implement a plan yourself, STOP and review first. The prompt you're about to send IS a brief - review it for design flaws before the age...
Full skill instructions
Use this skill when you're about to:
Task() for implementation workThe prompt you write IS the brief. If you're about to send an implementation agent a task, that task description needs review first.
Ask yourself: "Am I about to have code written (by me or an agent)?" If yes → domain review first.
Core principle: Task briefs contain design flaws. Domain experts catch them before implementation, not code reviewers after.
Real-world data: Phase 4A Task 16 (RiverGraph serialization) - "straightforward" brief reviewed by domain expert found 8 issues (3 critical type safety bugs, 3 important design gaps, 2 minor improvements). Cost: 5 minutes review. Savings: hours of debugging and refactoring.
NO IMPLEMENTATION WITHOUT DOMAIN REVIEW FIRST
If you have a written brief, as a separate file or within a larger plan, dispatch domain expert before any implementation. No exceptions.
Not for:
MANDATORY for:
Especially critical when:
Read brief → Implement → Code review finds issues → Refactor
Cost: Implementation time + refactoring time + context switching
Read brief → Domain experts review brief → Fix brief → Implement with corrections
Cost: 5 minutes review
Savings: Hours of rework
If you have Task tool available:
Use Task tool to dispatch domain-appropriate expert agents.
Dispatch the agents with a prompt similar to this format:
Task(subagent_type="general-purpose", prompt=f"""
**Role:** You are a [domain] expert specializing in [specific area].
**Task:** Review this task brief for technical correctness and design flaws.
**Brief location:** [path to brief]
**Review focus:**
1. [Domain-specific concerns - e.g., serialization format, data types, security, industry standards]
2. Edge cases and error handling
3. Performance implications
4. Best practices compliance
5. Integration considerations
6. Coherence with overall plan
7. Task complexity and whether it should be decomposed.
**Provide:**
1. List of issues (Critical/Important/Minor)
2. For each: what's wrong and recommended fix
3. Things done well
4. Overall: "Ready to implement" or "Needs revision"
**Note:** Review the BRIEF/DESIGN, not code. Focus on flaws that cause problems during implementation.
""")
If Task tool not available:
STOP and ask your human partner: "I need to have a domain expert review this brief before implementing. How should I dispatch a consulting agent in this environment?"
Don't skip review because tool isn't obvious. Escalate to get the right mechanism.
Now dispatch implementation agent with corrected brief.
Use code-reviewer to catch implementation gaps.
Serialization tasks: "Data serialization expert specializing in format design, type safety, and versioning"
Security tasks: "Application security specialist focusing on OWASP Top 10, attack vectors, and secure design patterns"
Networking tasks: "Distributed systems expert specializing in protocols, error handling, and network reliability"
Database tasks: "Database architect specializing in schema design, indexing strategies, and query optimization"
Algorithm tasks: "Algorithm specialist focusing on complexity analysis, edge cases, and correctness proofs"
Concurrency tasks: "Concurrency expert specializing in race conditions, deadlocks, and synchronization patterns"
| Excuse | Reality |
|---|---|
| "Brief is simple/straightforward" | Task 16 "straightforward serialization" had 8 issues. Simple briefs hide complex issues. |
| "Brief has TDD steps already" | TDD tests the implementation, not the design. Flawed design → passing tests for wrong behavior. |
| "Not security-critical" | Technical correctness matters everywhere. Type safety bugs, data loss, performance issues affect all code. |
| "I know this pattern" | Familiarity causes assumptions. Expert finds issues you overlook because "I've done this before." |
| "Domain review is overkill" | 5 minutes review vs hours debugging. Math favors review. |
| "Subagent overhead not worth it" | Agent dispatch: 30 seconds. Finding 8 bugs later: hours. Review always wins. |
| "I can see issues myself" | Then fix them in the brief BEFORE implementing. Domain expert systematically finds what you miss. |
| "We already reviewed the plan, so we don't need a review for this task brief" | More focused review on the task prompt routinely finds issues missed when reviewing the full plan. |
If you think ANY of these thoughts, STOP and dispatch domain expert:
All of these mean: Dispatch domain expert first. No exceptions.
CRITICAL: If you're using subagent-driven-development, you MUST add domain review as mandatory step.
Original workflow (from that skill):
For each task:
1. READ the task from plan
2. Dispatch implementation subagent
3. Code review
4. Fix code review issues
REQUIRED modification - add domain review FIRST:
For each task:
1. READ the task from plan
2. DISPATCH DOMAIN EXPERT to review task brief ← MANDATORY
3. ADDRESS domain expert issues ← MANDATORY
4. Dispatch implementation subagent
5. Code review
6. Fix code review issues
Why both reviews:
Skipping domain review = implementing flawed designs. Code review can't fix architectural problems.
Add domain review as first step before parallel execution:
1. Load plan
2. For each task: Dispatch domain expert, collect issues
3. Review all domain feedback with human
4. Execute tasks in parallel with corrections applied
Prevention vs remediation:
Cost comparison:
6× time savings for 5 minutes of review.
Task: "Implement RiverGraph serialization using NumPy npz format"
Without domain review:
With domain review (actual Phase 4A data):
Task briefs lie. Not maliciously - they're written without complete knowledge. Authors don't know every edge case, anti-pattern, or domain best practice.
Domain experts find the lies before they become bugs.
5 minutes. Every task. No exceptions.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience