Parallel integrate

From jpoutrin/product-forge · View interactive version

Parallel integrate is an AI agent skill from the GitHub repository jpoutrin/product-forge. Verify integration after parallel agent execution and generate report

How to use this skill

Skill file

parallel-integrate

Category: Parallel Development

Usage

/parallel-integrate [--parallel-dir <dir>] [--tech django|typescript|go]

Arguments

Purpose

Verify integration after all parallel agents complete their work. Checks contract compliance, boundary violations, runs tests, and generates an integration report.

Prerequisites

Execution Instructions for Claude Code

0. Determine Parallel Directory

If --parallel-dir provided:

If not provided:

Read manifest.json from parallel directory:

PARALLEL_DIR="parallel/TS-0042-inventory-system"
cat "$PARALLEL_DIR/manifest.json"

1. Verify Branch Status

Check all task branches are complete:

# List task branches
git branch -a | grep feature/task-

# Check for unmerged branches
git branch --no-merged main | grep feature/task-

2. Merge Remaining Branches

If unmerged branches exist:

git checkout main
for branch in $(git branch --no-merged main | grep feature/task-); do
    echo "Merging $branch..."
    git merge $branch --no-edit
done

3. Technology-Specific Integration

For Django Projects

Migration Merge:

# Check for migration conflicts
python manage.py showmigrations | grep "\[ \]"

# If conflicts, merge migrations
python manage.py makemigrations --merge

# Apply all migrations
python manage.py migrate

Verification:

# Django system check
python manage.py check

# Run all tests
pytest

# Type checking
mypy apps/

# Linting
ruff check .
For TypeScript Projects

Build Verification:

# Type check
npx tsc --noEmit

# Lint
npm run lint

# Run tests
npm test

# Build
npm run build
For Go Projects
# Build and vet
go build ./...
go vet ./...

# Run tests
go test ./...

# Check formatting
gofmt -d .

4. Contract Compliance Check

For each task in $PARALLEL_DIR/tasks/:

API Contract Check:

Type Contract Check:

5. Boundary Violation Check

For each task, verify:

# Check git history for boundary violations
for task in $(ls $PARALLEL_DIR/tasks/); do
    echo "Checking $task boundaries..."
    # Compare committed files against task scope
done

6. Tech Spec Compliance Check

Read Tech Spec path from manifest:

TECH_SPEC=$(jq -r '.tech_spec.path' "$PARALLEL_DIR/manifest.json")

If Tech Spec exists, validate implementation:

Architecture Alignment:

Data Model Compliance:

API Compliance:

7. Generate Integration Report

Create $PARALLEL_DIR/integration-report.md:

# Integration Report

Generated: [date]
Parallel Dir: parallel/TS-0042-inventory-system
Source PRD: [from manifest.sources.prd]
Tech Spec: [from manifest.tech_spec.id]
Tasks Integrated: [count]

## Summary

| Check | Status | Details |
|-------|--------|---------|
| Branch Merge | ✅/❌ | X branches merged |
| Contract Compliance | ✅/⚠️/❌ | X/Y endpoints match |
| Tech Spec Compliance | ✅/⚠️/❌ | X deviations |
| Boundary Violations | ✅/❌ | X violations found |
| Tests | ✅/❌ | X passed, Y failed |
| Type Check | ✅/❌ | X errors |
| Lint | ✅/❌ | X warnings |

## Contract Compliance

### API Endpoints

| Endpoint | Status | Notes |
|----------|--------|-------|
| GET /api/users/ | ✅ | Matches spec |
| POST /api/users/ | ⚠️ | Missing validation field |

### Type Definitions

| Type | Status | Notes |
|------|--------|-------|
| UserDTO | ✅ | Matches contract |
| OrderDTO | ⚠️ | Extra field `updated_at` |

## Boundary Violations

| Task | File | Issue |
|------|------|-------|
| task-003 | apps/users/models.py | Modified (owned by task-001) |

## Tech Spec Compliance

| Section | Status | Deviations |
|---------|--------|------------|
| Architecture | ✅ | None |
| Data Model | ⚠️ | Added `updated_at` to User |
| API Spec | ✅ | None |

## Test Results

pytest results:

Passed: 142

Failed: 2

Coverage: 84%


## Action Items

### Must Fix (Blocking)
1. ❌ Fix failing tests

### Should Fix (Non-Blocking)
1. ⚠️ Add missing validation field

## Next Steps

[If all checks pass]:
1. ✅ Integration complete
2. Create PR for review

8. Update manifest.json

Update integration status:

{
  "integration": {
    "status": "completed",
    "report_path": "integration-report.md",
    "completed_at": "2025-12-07T18:00:00Z",
    "checks": {
      "branch_merge": "passed",
      "contract_compliance": "warning",
      "boundary_violations": "passed",
      "tests": "passed"
    }
  }
}

9. Report Results

Output to console:

Integration Verification Complete

Parallel Dir: parallel/TS-0042-inventory-system
Tech Spec: TS-0042-inventory-system

┌────────────────────┬────────┬─────────────────────────┐
│ Check              │ Status │ Details                 │
├────────────────────┼────────┼─────────────────────────┤
│ Branch Merge       │ ✅     │ 9 branches merged       │
│ Contract Compliance│ ⚠️     │ 18/20 endpoints match   │
│ Boundary Violations│ ✅     │ 0 violations            │
│ Tests              │ ✅     │ 142 passed              │
│ Type Check         │ ✅     │ 0 errors                │
│ Lint               │ ✅     │ 0 warnings              │
└────────────────────┴────────┴─────────────────────────┘

Full report: parallel/TS-0042-inventory-system/integration-report.md

[If clean]:
✅ Integration successful!

Next steps:
1. Review report
2. Create pull request
3. Deploy to staging

Example

# Auto-detect parallel directory
/parallel-integrate

# Specify parallel directory
/parallel-integrate --parallel-dir parallel/TS-0042-inventory-system

# With Django-specific checks
/parallel-integrate --parallel-dir parallel/TS-0042-inventory-system --tech django

# After fixing issues, re-run
/parallel-integrate

# View report
cat parallel/TS-0042-inventory-system/integration-report.md

Integration Checklist

Related Commands

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.