xiaohongshu
xiaohongshu
completion-criteria
Completion checklist - when is a task truly done
Full skill instructions
Task is ONLY complete when ALL items checked:
npm run clean && npm run generatenpm test)npm run build)npm run shrinkwrap)Task FAILS if:
Operation name contains 'describe'
API spec contains 4xx or 5xx responses
Skipped generation step
npm run clean && npm run generateNo tests written
Tests not run
npm testBuild not verified
npm run buildDependencies not locked
npm run shrinkwrapUsed Promise<any> in signatures
Stopped before Gate 6
Schema used in both nested and direct contexts without separation
{Schema}Summary for nested usageconst userId = '12345' ❌const userId = TEST_USER_ID ✅Watch for these signs:
npm test output shownIf user has to remind about tests: TASK HAS FAILED
✅ OPERATION COMPLETE: getAccessToken
Gate 1 - API Specification: ✅
- Operation: getAccessToken (uses 'get', not 'describe')
- Summary: "Retrieve an access token"
- Description from vendor docs included
- Response: 200 only (no error codes)
- All properties camelCase
Gate 2 - Type Generation: ✅
- Ran: npm run clean && npm run generate
- Generated: AccessToken interface
- No InlineResponse types
- Exit code: 0
Gate 3 - Implementation: ✅
- Added to AccessTokenProducer
- Signature: Promise<AccessToken> (not any)
- Mappers handle snake_case → camelCase
- Error handling uses core errors
Gate 4 - Test Creation: ✅
- Unit tests: test/AccessTokenProducerTest.ts (4 cases)
- Integration: test/integration/AccessTokenIntegrationTest.ts (2 cases)
- Mock responses configured
Gate 5 - Test Execution: ✅
- Ran: npm test
- Result: 6 passing
- No regressions
- Exit code: 0
Gate 6 - Build: ✅
- Ran: npm run build
- Result: Success
- No errors
- Exit code: 0
- Ran: npm run shrinkwrap
- npm-shrinkwrap.json created
- Dependencies locked
Operation is fully implemented, tested, and verified.
| Rule | Violation = Task Failure |
|---|---|
| NEVER use 'describe' prefix | ✅ Yes |
| ONLY 200/201 responses | ✅ Yes |
| ALWAYS run generate after API changes | ✅ Yes |
| ALWAYS write tests | ✅ Yes |
| ALWAYS run tests | ✅ Yes |
| ALWAYS build and verify | ✅ Yes |
| ALWAYS run shrinkwrap | ✅ Yes |
NO Promise<any> types | ✅ Yes |
#!/bin/bash
# validate-operation.sh
echo "🚦 Validating operation completion..."
FAILED=0
# Gate 1: API Spec
if grep -E "describe[A-Z]" api.yml > /dev/null 2>&1; then
echo "❌ Gate 1 FAILED: 'describe' found in api.yml"
FAILED=1
fi
if grep "nullable:" api.yml > /dev/null 2>&1; then
echo "❌ Gate 1 FAILED: 'nullable' found in api.yml"
FAILED=1
fi
# Check for schema context separation issues
nested_schemas=$(yq eval '.components.schemas[] | .. | select(type == "string" and test("#/components/schemas/")) | capture("#/components/schemas/(?<schema>.+)").schema' api.yml 2>/dev/null | sort -u)
endpoint_schemas=$(yq eval '.paths.*.*.responses.*.content.*.schema["$ref"]' api.yml 2>/dev/null | grep -o '[^/]*$' | sort -u)
for schema in $nested_schemas; do
if echo "$endpoint_schemas" | grep -q "^${schema}$"; then
prop_count=$(yq eval ".components.schemas.${schema}.properties | length" api.yml 2>/dev/null)
if [ "$prop_count" -gt 10 ] 2>/dev/null; then
echo "⚠️ WARNING: Schema '${schema}' used in BOTH nested and direct contexts with ${prop_count} properties"
echo " Consider creating '${schema}Summary' for nested usage (see api-specification.md Rule #19)"
fi
fi
done
# Gate 2: Generation
if [ ! -d "generated" ]; then
echo "❌ Gate 2 FAILED: No generated directory"
FAILED=1
fi
# Gate 3: Implementation
if grep "Promise<any>" src/*.ts > /dev/null 2>&1; then
echo "❌ Gate 3 FAILED: Promise<any> found"
FAILED=1
fi
# Gate 4: Tests exist
if ! find test -name "*Test.ts" | grep -q .; then
echo "❌ Gate 4 FAILED: No test files"
FAILED=1
fi
# Gate 4b: No hardcoded test values in integration tests
if [ -d "test/integration" ]; then
if grep -E "(const|let|var) [a-zA-Z]*[Ii]d = ['\"][0-9]+['\"]" test/integration/*.ts > /dev/null 2>&1; then
echo "❌ Gate 4 FAILED: Hardcoded test values in integration tests"
echo " All test values must be in .env and imported from Common.ts"
FAILED=1
fi
fi
# Gate 5: Tests pass
if ! npm test > /dev/null 2>&1; then
echo "❌ Gate 5 FAILED: Tests failing"
FAILED=1
fi
# Gate 6: Build passes
if ! npm run build > /dev/null 2>&1; then
echo "❌ Gate 6 FAILED: Build failing"
FAILED=1
fi
# Gate 6b: Shrinkwrap dependencies
if ! npm run shrinkwrap > /dev/null 2>&1; then
echo "❌ Gate 6 FAILED: Shrinkwrap failing"
FAILED=1
fi
if [ ! -f "npm-shrinkwrap.json" ]; then
echo "❌ Gate 6 FAILED: npm-shrinkwrap.json not created"
FAILED=1
fi
if [ $FAILED -eq 0 ]; then
echo "✅ ALL GATES PASSED - Operation complete!"
else
echo "🚨 FAILED - Fix issues and re-validate"
exit 1
fi
GATES ARE NOT OPTIONAL
Every operation MUST pass through ALL gates sequentially. No shortcuts. No exceptions. Complete or fail.
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