xiaohongshu
xiaohongshu
build-standards
Build quality standards, validation checkpoints, and compilation requirements
Full skill instructions
npm run build MUST exit with code 0npm run lint MUST pass without errorsBuild MUST pass with exit code 0 after EACH of these steps:
Pre-Implementation Validation (MANDATORY)
"skipLibCheck": true to tsconfig.jsonnpm run build - MUST exit with code 0Post-Dependency Install
npm install for new dependenciesPost-HTTP Client Creation
src/{ServiceName}Client.tsPost-Mappers Creation
src/Mappers.tsPost-Producer Implementation (Each)
Post-Connector Implementation
Post-Entry Point Update
src/index.tsFINAL BUILD GATE (Task Completion)
npm run build exits with code 0CRITICAL: If npm run build fails at ANY checkpoint, STOP all work immediately.
{
"compilerOptions": {
"skipLibCheck": true, // MANDATORY - Add before implementation
"strict": true, // Maintain strict checking
"noImplicitAny": true,
"strictNullChecks": true
}
}
Required scripts that must exist and work:
build: Compile TypeScriptclean: Remove build artifactslint: Check code styletest: Run unit teststest:integration: Run integration testsnpm install after adding dependenciesgenerated/ directory# Standard validation sequence
npm run clean
npm run build
npm run lint
npm run test
npm run test:integration # If credentials available
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// Reason: External API returns untyped response
# Clean previous generation
rm -rf generated/
# Run generator
npm run clean && npm run generate
# Capture exit code
EXIT_CODE=$?
echo "Exit code: $EXIT_CODE"
# Exit code MUST be 0
if [ $EXIT_CODE -ne 0 ]; then
echo "❌ Gate 2 FAILED: Generation failed"
exit 1
fi
# Check generated directory exists
if [ ! -d "generated" ]; then
echo "❌ Gate 2 FAILED: No generated directory"
exit 1
fi
# List generated files
ls -la generated/api/
ls -la generated/model/
# Count generated files
FILE_COUNT=$(find generated -name "*.ts" | wc -l)
echo "Generated $FILE_COUNT TypeScript files"
# Must have at least some files
if [ $FILE_COUNT -eq 0 ]; then
echo "❌ Gate 2 FAILED: No files generated"
exit 1
fi
# InlineResponse indicates inline schemas (bad)
if grep -r "InlineResponse\|InlineRequestBody" generated/; then
echo "❌ Gate 2 FAILED: Inline types found"
echo "Fix: Move inline schemas to components/schemas in api.yml"
exit 1
fi
Why this matters: InlineResponse types indicate inline schemas in api.yml. All schemas must be named and in components/schemas.
# Try to compile generated code
npm run build
# Check exit code
if [ $? -ne 0 ]; then
echo "❌ Gate 2 FAILED: TypeScript compilation errors"
echo "Check generated types for issues"
exit 1
fi
# Clean previous build
rm -rf dist/
# Run build
npm run build
# Capture exit code
EXIT_CODE=$?
echo "Build exit code: $EXIT_CODE"
# MUST be 0
if [ $EXIT_CODE -ne 0 ]; then
echo "❌ Gate 6 FAILED: Build failed"
exit 1
fi
# Distribution directory must exist
if [ ! -d "dist" ]; then
echo "❌ Gate 6 FAILED: No dist directory"
exit 1
fi
# Count artifacts
FILE_COUNT=$(find dist -name "*.js" | wc -l)
echo "Generated $FILE_COUNT JavaScript files"
# Must have files
if [ $FILE_COUNT -eq 0 ]; then
echo "❌ Gate 6 FAILED: No compiled files"
exit 1
fi
# Check for index files
if [ ! -f "dist/index.js" ]; then
echo "❌ Gate 6 FAILED: No dist/index.js"
exit 1
fi
# Run shrinkwrap
npm run shrinkwrap
# Capture exit code
EXIT_CODE=$?
echo "Shrinkwrap exit code: $EXIT_CODE"
# MUST be 0
if [ $EXIT_CODE -ne 0 ]; then
echo "❌ Gate 6 FAILED: Shrinkwrap failed"
exit 1
fi
# Verify shrinkwrap file exists
if [ ! -f "npm-shrinkwrap.json" ]; then
echo "❌ Gate 6 FAILED: npm-shrinkwrap.json not created"
exit 1
fi
# Run type check separately if configured
npm run type-check 2>&1
# Should show no errors
if [ $? -ne 0 ]; then
echo "⚠️ Type check failed"
fi
Error: Property 'x' does not exist on type 'Y'
Fix: Check type definitions
Error: Cannot find module 'X'
Fix: Check imports
Error: npm ERR! shrinkwrap failed
Fix: Check npm state
Error: Found InlineResponse200, InlineResponse201
Cause: Inline schema in api.yml
# ❌ WRONG - Inline schema
responses:
'200':
content:
application/json:
schema:
type: object # Inline schema
properties: ...
Fix: Move to components/schemas
# ✅ CORRECT - Reference named schema
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Webhook'
Error: "Could not resolve reference"
Cause: Invalid $ref in api.yml
# ❌ WRONG
$ref: '#/components/schemas/NonExistent'
Fix: Ensure referenced schema exists
# ✅ CORRECT
components:
schemas:
NonExistent:
type: object
npm run clean && npm run generate exit code is 0npm run build succeeds with no errorsnpm run build exit code is 0npm run shrinkwrap exit code is 0All criteria MUST pass to proceed/complete task
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