skills/workflow/multi-repo-workflow/SKILL.md
Use when coordinating changes across multiple microservice repositories.
npx skillsauth add faysilalshareef/dotnet-ai-kit multi-repo-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
{company}-{domain}-command/ # Command-side event sourcing
{company}-{domain}-query/ # Query-side SQL projections
{company}-{domain}-cosmos-query/ # Query-side Cosmos projections
{company}-{domain}-processor/ # Event processor
{company}-{domain}-gateway/ # REST API gateway
{company}-{domain}-controlpanel/ # Blazor control panel
{company}-shared-contracts/ # Shared proto files, event types
shared-contracts (proto files, event data types)
↓
command (produces events)
↓
query (consumes events, provides query API)
↓
processor (routes events, calls query/command via gRPC)
↓
gateway (calls command + query via gRPC)
↓
controlpanel (calls gateway via REST)
Step 1: shared-contracts
- Add new event data types
- Add new proto messages/RPCs
- PR and merge
Step 2: command
- Add aggregate behavior
- Add command handler
- Add event store configuration
- PR and merge
Step 3: query
- Add query entity
- Add event handlers
- Add query handlers
- PR and merge
Step 4: processor (if needed)
- Add event routing for new event types
- Add cross-service handlers
- PR and merge
Step 5: gateway
- Add REST controller endpoint
- Add gRPC client registration
- PR and merge
Step 6: controlpanel (if needed)
- Add gateway facade method
- Add UI page/dialog
- PR and merge
Feature: feature/{feature-name}
Bugfix: fix/{issue-description}
Hotfix: hotfix/{issue-description}
Example across repos:
{domain}-command: feature/order-export
{domain}-query: feature/order-export
{domain}-gateway: feature/order-export
# Deploy in order
kubectl apply -f {domain}-command/deploy/prod-manifest.yaml
# Wait for rollout
kubectl rollout status deployment/{domain}-command -n {company}-prod
kubectl apply -f {domain}-query/deploy/prod-manifest.yaml
kubectl rollout status deployment/{domain}-query -n {company}-prod
kubectl apply -f {domain}-gateway/deploy/prod-manifest.yaml
kubectl rollout status deployment/{domain}-gateway -n {company}-prod
| Anti-Pattern | Correct Approach | |---|---| | Deploying gateway before query | Follow dependency chain order | | Breaking proto contracts | Additive changes only; never remove fields | | Different branch names across repos | Use same feature name across all repos | | Shared contracts as NuGet package | Copy proto files or use git submodule |
# Find shared contracts
find ../ -name "shared-contracts" -type d 2>/dev/null
# Find proto file references
grep -r "Protobuf Include" --include="*.csproj" .
# Check remote URLs
git remote -v
When a feature spans multiple repos, the primary repo projects a feature-brief.md to each affected secondary repo. Briefs live in a separate briefs/ directory, NOT in features/:
.dotnet-ai-kit/
├── features/ ← LOCAL features (this repo's numbering)
└── briefs/ ← PROJECTED from other repos
└── {source-repo}/ ← namespaced by source repo name
└── {NNN}-{name}/
└── feature-brief.md
| Phase | Action | Brief Phase |
|-------|--------|-------------|
| /dai.specify | Create brief with role, changes, events | Specified |
| /dai.clarify | Update if events/entities/boundaries changed | Specified |
| /dai.plan | Add Implementation Approach section | Planned |
| /dai.tasks | Add filtered task list for this repo | Tasks Generated |
| /dai.implement | Mark tasks done, track progress | Implementing → Implemented |
features/ and briefs/ numbering are independent — no collisions/dai.init never touches briefs/data-ai
Use when about to claim work is complete, fixed, passing, or ready — before committing, creating PRs, or moving to the next task. Requires running verification commands and confirming output before making any success claims.
development
Use when encountering any bug, test failure, build error, or unexpected behavior — before proposing fixes or making changes.
development
Use when checkpointing, wrapping up, or handing off an AI-assisted development session.
development
Use when following the Specification-Driven Development lifecycle from plan through ship.