brainstorming
Structured design dialogue that validates ideas before implementation begins.
merge-agent-work
Merge agent work from agent branch to task branch with validation
Full skill instructions
Purpose: Safely merge agent work from agent branch to task branch with proper validation and state tracking.
Performance: Reduces merge errors, ensures work properly integrated
# Check agent status
STATUS=$(jq -r '.status' /workspace/tasks/{task}/agents/{agent}/status.json)
if [ "$STATUS" != "completed" ]; then
echo "Agent not completed: $STATUS"
exit 1
fi
# Must merge in task worktree
cd /workspace/tasks/{task-name}/code
# Merge agent branch to task branch
git merge {task-name}-{agent} --no-ff --no-edit
# Verify merge succeeded
- No conflicts
- Files added/modified as expected
- Build still succeeds (optional)
- Commit created
# Update task.json
jq '.agents.{agent}.merged = true | .agents.{agent}.merge_time = "timestamp"' \
task.json > tmp.json
mv tmp.json task.json
# After architect agent completes
TASK_NAME="implement-formatter-api"
AGENT="architect"
/workspace/main/.claude/scripts/merge-agent-work.sh \
--task "$TASK_NAME" \
--agent "$AGENT"
# Merge and validate build succeeds
TASK_NAME="implement-formatter-api"
AGENT="tester"
/workspace/main/.claude/scripts/merge-agent-work.sh \
--task "$TASK_NAME" \
--agent "$AGENT" \
--validate-build true \
--build-command "mvn test"
# Merge all completed agents
TASK_NAME="implement-formatter-api"
for agent in architect tester formatter; do
STATUS=$(jq -r '.status' /workspace/tasks/$TASK_NAME/agents/$agent/status.json)
if [ "$STATUS" = "completed" ]; then
/workspace/main/.claude/scripts/merge-agent-work.sh \
--task "$TASK_NAME" \
--agent "$agent"
fi
done
On any error:
Recovery: Can retry after fixing issues
IMPLEMENTATION state: All agents working in parallel
↓
Agent 1 completes (status: completed)
↓
[merge-agent-work: Agent 1 → task branch]
↓
Agent 2 completes (status: completed)
↓
[merge-agent-work: Agent 2 → task branch]
↓
Agent 3 completes (status: completed)
↓
[merge-agent-work: Agent 3 → task branch]
↓
All agents merged, transition to VALIDATION
Agent implements feature (round 1)
↓
[merge-agent-work: Agent → task]
↓
Validation finds issues
↓
Re-invoke agent for fixes (round 2)
↓
[merge-agent-work: Agent → task]
↓
Validation passes
Script returns JSON:
{
"status": "success",
"message": "Agent work merged successfully",
"task_name": "implement-formatter-api",
"agent_name": "architect",
"agent_branch": "implement-formatter-api-architect",
"task_branch": "implement-formatter-api",
"merge_commit": "abc123def456",
"files_changed": 15,
"insertions": 450,
"deletions": 23,
"build_validation": "passed",
"timestamp": "2025-11-11T12:34:56-05:00"
}
# Creates merge commit (preserves agent work history)
git merge {agent-branch} --no-ff
# Benefit: Clear history of agent contributions
# Result: Merge commit shows what agent did
# Linear history (no merge commit)
git merge {agent-branch} --ff-only
# Benefit: Cleaner history
# Risk: Loses agent contribution visibility
# Squashes all agent commits into one
git merge {agent-branch} --squash
# Problem: Loses agent work history
# Use case: Only if agent made many tiny commits
# For simple conflicts, skill can auto-resolve:
- Both added same file → Use agent's version
- Both modified same file → Use agent's version (if main agent made no changes)
# Skill reports conflict, main agent must resolve:
- Both modified same lines
- Complex merge conflicts
- Semantic conflicts (code compiles but behavior conflicts)
# Quick validation:
- Merge completed
- No conflicts
- Commit created
# More thorough:
- Minimal validation
- File count reasonable (not empty merge)
- Diff size reasonable (not huge merge)
# Complete validation:
- Standard validation
- Build succeeds
- Tests pass
- No Checkstyle/PMD violations
# Check agent status
jq -r '.status' /workspace/tasks/{task}/agents/{agent}/status.json
# Possible statuses:
# - "in_progress" → Wait for completion
# - "failed" → Investigate agent error
# - "not_started" → Agent never invoked
# Wait for completion or re-invoke agent
# View conflicts
cd /workspace/tasks/{task-name}/code
git status
# Resolve manually:
# 1. Edit conflicted files
# 2. Stage resolved files: git add <file>
# 3. Complete merge: git commit
# 4. Update state tracking
# Merge succeeded but build broken
# Options:
# 1. Revert merge: git reset --hard HEAD~1
# 2. Re-invoke agent with fix requirements
# 3. Main agent fixes in VALIDATION state (if compilation error)
# After fix, retry merge
# Must be in task worktree, not agent worktree
# Verify current directory
pwd
# Should be: /workspace/tasks/{task-name}/code
# NOT: /workspace/tasks/{task-name}/agents/{agent}/code
# Switch to task worktree
cd /workspace/tasks/{task-name}/code
# Merge agents one at a time, validate each
merge architect → validate → merge tester → validate → merge formatter
# Merge all completed agents, then validate once
merge architect → merge tester → merge formatter → validate all
# Merge agent, test, fix if needed, repeat
merge agent → test → if fail: fix → merge again
The merge-agent-work script performs:
Validation Phase
Merge Preparation Phase
Merge Execution Phase
Merge Validation Phase
State Update Phase
Reporting Phase
Structured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs