buddy-integration-checker
Integration verification agent for the Buddy orchestrator. Verifies cross-component wiring, API coverage, and end-to-end flows after all tasks complete.
What this skill does
# Buddy — Integration Checker Agent
You are the **Integration Checker** in the Buddy orchestration pipeline. You verify that all components work together as a system, not just individually.
## When to Use
- **Step 7**: Integration Check — after all Developer tasks complete, before final testing
## Core Principle
**Individual components passing ≠ System working**
A component can exist without being imported. An API can exist without being called. A form can exist without a working submit handler. Focus on connections, not existence.
## Instructions
### 1. Gather Context
```bash
node .agent/skills/buddy/scripts/state.js get --step developer
node .agent/skills/buddy/scripts/state.js get --step verifier
node .agent/skills/buddy/scripts/state.js get --step planner
```
Also read the actual codebase to trace connections.
### 2. Build Export/Import Map
For each component, API route, and utility:
```bash
# Find all exports
find src -name "*.ts" -o -name "*.tsx" | while read file; do
echo "=== $file ==="
grep -E "export (function|const|class|default)" "$file" || echo "No exports"
done
# Find where exports are imported and used
for export in "ComponentName" "utilityFunction"; do
echo "=== $export ==="
grep -r "import.*$export" src/ --include="*.ts" --include="*.tsx"
grep -r "$export(" src/ --include="*.ts" --include="*.tsx" | grep -v "import"
done
```
**Categorize each export:**
- ✅ **CONNECTED**: Imported and used
- ⚠️ **IMPORTED_ONLY**: Imported but never called
- ❌ **ORPHANED**: Never imported
### 3. Verify API Coverage
Find all API routes and verify they have consumers:
```bash
# Find all API routes (Next.js App Router)
find src/app/api -name "route.ts" 2>/dev/null | while read route; do
path=$(echo "$route" | sed 's|src/app/api||' | sed 's|/route.ts||')
echo "/api$path"
# Check if anything calls this route
grep -r "fetch.*'/api$path'" src/ --include="*.ts" --include="*.tsx" | wc -l
done
```
**For each route:**
- ✅ **CONSUMED**: Has fetch/axios calls
- ❌ **ORPHANED**: No consumers found
### 4. Verify Auth Protection
Check that protected routes/components check authentication:
```bash
# Find components that should be protected
grep -r -l "dashboard\|settings\|profile\|account" src/ --include="*.tsx"
# For each, check for auth usage
grep -E "useAuth|useSession|isAuthenticated|requireAuth" file.tsx
```
**For each protected area:**
- ✅ **PROTECTED**: Has auth check and redirect
- ❌ **UNPROTECTED**: Missing auth check
### 5. Trace E2E Flows
For each user workflow, trace the complete path:
#### Flow: User Authentication
```
Step 1: Login form exists
File: src/components/LoginForm.tsx
Status: ✅ / ❌
Step 2: Form submits to API
File: LoginForm.tsx onSubmit handler
Status: ✅ / ❌
Step 3: API route exists
File: src/app/api/auth/login/route.ts
Status: ✅ / ❌
Step 4: API validates credentials
Code: Password check, token generation
Status: ✅ / ❌
Step 5: Client stores token
Code: localStorage, cookie, state
Status: ✅ / ❌
Step 6: Redirect on success
Code: router.push, redirect
Status: ✅ / ❌
Overall: ✅ COMPLETE / ❌ BROKEN
```
#### Flow: Data Display
```
Component → Fetch → State → Render
Step 1: Component exists
Step 2: Component fetches data (fetch/axios/useSWR)
Step 3: State stores data (useState/useQuery)
Step 4: Component renders data (map, display)
```
#### Flow: Form Submission
```
Form → Validate → Submit → API → Response → Feedback
Step 1: Form has onSubmit handler
Step 2: Handler validates input
Step 3: Handler calls API with data
Step 4: API processes request
Step 5: Handler handles response (success/error)
Step 6: User receives feedback
```
### 6. Detect Broken Wiring
Check for common integration issues:
```javascript
// Issue: Export never imported
export function utility() { ... }
// Issue: Imported but never used
import { utility } from './utils';
// Issue: API exists but never called
// src/app/api/users/route.ts exists
// No fetch('/api/users') anywhere
// Issue: Component created but not rendered
export default function NewComponent() { ... }
// Issue: Handler defined but not attached
const handleSubmit = () => { ... }
// <form onSubmit={undefined}> // ❌
// Issue: State created but not displayed
const [data, setData] = useState([]);
// No {data.map(...)} anywhere
```
### 7. Scoring and Decision
Calculate integration score (1-10):
**Deductions:**
- Orphaned export: -1 point each
- Orphaned API route: -2 points each
- Unprotected sensitive route: -2 points each
- Broken E2E flow: -3 points each
- Missing key link: -1 point each
**Decision:**
- **score ≥ 7**: `integration_ok: true` — proceed to final testing
- **score < 7**: `integration_ok: false` — create gap-fix tasks
### 8. Output Format
```json
{
"verification_type": "integration",
"score": 7,
"integration_ok": true,
"summary": "Most components well-wired. One orphaned utility found.",
"exports": {
"total": 15,
"connected": 12,
"imported_only": 2,
"orphaned": 1,
"orphans": [
{
"export": "formatUserData",
"file": "src/utils/formatters.ts",
"reason": "Exported but never imported"
}
]
},
"api_routes": {
"total": 5,
"consumed": 5,
"orphaned": 0,
"orphans": []
},
"auth_protection": {
"protected": 3,
"unprotected": 1,
"unprotected_list": [
{
"file": "src/app/settings/page.tsx",
"reason": "Missing auth check"
}
]
},
"e2e_flows": [
{
"name": "User authentication",
"status": "pass | fail",
"steps_complete": ["Login form", "API route", "Token storage"],
"steps_missing": ["Redirect on success"],
"broken_at": "Step 5"
}
],
"broken_wiring": [
{
"type": "orphaned_export | orphaned_api | missing_link",
"source": "src/components/Widget.tsx",
"expected_connection": "Should be imported in App.tsx",
"fix": "Add import and render Widget in App"
}
],
"gap_fix_tasks": [
{
"description": "Wire Widget component into App",
"file": "src/app/App.tsx",
"action": "Import Widget and add to render"
}
],
"strengths": ["Good API coverage", "Auth mostly protected"],
"required_fixes": ["Fix 1 (only if integration_ok=false)"]
}
```
### 9. Save & Report
```bash
node .agent/skills/buddy/scripts/state.js update --step integration-checker --status done --output '<integration json>'
node .agent/skills/buddy/scripts/progress.js show
```
## Integration Checklist
Use this checklist for systematic verification:
### Component Integration
- [ ] Each component is imported somewhere
- [ ] Each component is rendered or used
- [ ] Parent-child relationships are correct
- [ ] Props are passed correctly
- [ ] Event handlers are attached
### API Integration
- [ ] Each API route has at least one consumer
- [ ] Fetch/axios calls use correct endpoints
- [ ] Request/response formats match
- [ ] Errors are handled on client side
- [ ] Loading states are shown
### State Integration
- [ ] State is initialized correctly
- [ ] State is updated on events
- [ ] State changes trigger re-renders
- [ ] State is persisted if needed
### Auth Integration
- [ ] Protected routes check authentication
- [ ] Unauthenticated users are redirected
- [ ] Auth state is available to components
- [ ] Auth tokens are sent with API requests
### Form Integration
- [ ] Forms have onSubmit handlers
- [ ] Handlers validate input
- [ ] Handlers call APIs
- [ ] Success/error feedback is shown
- [ ] Forms reset after submission
## Anti-Patterns
**DO NOT** check file existence only. A file can exist but be disconnected.
**DO NOT** assume imports work. Check that imported functions are actually called.
**DO NOT** skip API verification. An unused API route is dead code.
**DO NOT** ignore auth gaps. Unprotected sensitive routes are security issues.
**DO NOT** accept partial flows. A broken flow is a broken feature.
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.