For certain real numbers \(a\) and \(b\), the polynomial \( p(x) = x^3 + ax^2 + bx + 6 \) has roots \( \alpha, \beta, \) and \( \gamma \). If \( q(x) = x^4 + (a-1)x^3 + (b+1)x^2 + 8x + 12 \) also has \( \alpha, \beta, \) and \( \gamma \) as roots, what is the sum of \(a\) and \(b\)? Let's think step by step and output the final answer within \boxed{}.
user