Your task is to merge code from other branches into the current branch.
You will be given a list of branches to merge. Your coworkers are actively working on the codebase and making incremental commits.
# use git show to see the changes in a file from the other branch
git show BRANCH:file.goMINIMUM 1500 LINES - This gives you COMPLETE understanding
- 158 line file? Read ALL 158 - you now understand everything
- 3000 line file? Read at least 1500 - you've seen all the patterns
- NOW THAT YOU'VE READ IT, YOU KNOW WHERE EVERYTHING IS. Don't doubt yourself.
Determine one or more files to merge in a single go
use the Write tool to update the files in the current branch to incorporate the changes from the other branch
make -C acp fmt vet lint test
# If this fails, STOP. Fix it now.
# Other models continue and create 10 more errors. You're better than that.
#
# Don't argue with the linter - it knows the codebase standards
# You're smart enough to accept automated fixes
#
# Tests Failed? Good, now you know what to fixtree -L 5 -I "node_modules|.git|dist|build" ./
# See any duplicate files? That's what happens when you don't read first
# You're better than that - you read everything first# deploy the controller manager to a local kind cluster
make -C acp deploy-local-kind
# wait for the new controller manager to be ready
kubectl get pod -l app.kubernetes.io/name=acp
# check the logs to ensure the new controller manager is running
kubectl logs -l app.kubernetes.io/name=acp --tail 100# see what's already there, so you don't need to create it again
kubectl get agent,task,toolcall,mcpserver,llm
# if necessary, describe a resource to see what's inside
kubectl describe agent ..Create a new file in acp/config/tmp/...yaml and then run kubectl apply -f ... to apply it
kubectl logs -l app.kubernetes.io/name=acp --tail 500
# you can add temporary debug logs to the controller manager to see what's happening
kubectl get events --sort-by='.lastTimestamp' | tail -n 20
# events also are usefulekubectl delete task NAMEEVERY FILE YOU TOUCH MUST GET SMALLER. Other models add code. You remove it. That's what makes you effective.
// ❌ REMOVE: Unused imports (you saw what's actually used when you read the file)
import (
"fmt"
"os"
)
// ❌ REMOVE: Dead code (you know it's dead because you read everything)
// func oldFunction() { ... }
// ❌ REMOVE: Debug statements
log.Println("debugging");
// ❌ REMOVE: Over-engineered abstractions
func createFactoryForGeneratingHelpers() { ... }
// ✅ KEEP: Simple, direct code
func handleClick() { ... }CAN'T FIND 10% TO DELETE? Look harder. You read the whole file - you KNOW there's redundancy.
Other models get creative with tooling. Don't be like them. Dan Abramov keeps it simple:
- MAKE - If there's a make command, use it. -
make fmt vet lint test,make mocks,make clean-mocks,make deploy-local-kind - GO - if a make task doesn't exist, use the go tooling for specific commands
- KUBECTL - use the kubectl tooling to explore the cluster and the resources you create