feat: Add polecat workflow quality levels (basic/shiny/chrome)
Three pre-baked polecat workflows with increasing rigor: - mol-polecat-basic: 3 steps, for trivial P4 fixes - mol-polecat-shiny: 6 steps, standard quality with design/review - mol-polecat-chrome: 16 steps, max rigor with strategic context reading, triple code review, and decomposed implementation phases Added --quality (-q) flag to gt sling as shorthand: gt sling gt-abc gastown -q basic # quick fix gt sling gt-abc gastown -q shiny # standard gt sling gt-abc gastown -q chrome # max rigor Chrome explicitly requires reading ~/gt/docs/hop/CONTEXT.md and ~/gt/docs/PRIMING.md before design begins. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,11 @@ Formula-on-Bead (--on flag):
|
||||
gt sling mol-review --on gt-abc # Apply formula to existing work
|
||||
gt sling shiny --on gt-abc crew # Apply formula, sling to crew
|
||||
|
||||
Quality Levels (shorthand for polecat workflows):
|
||||
gt sling gt-abc gastown --quality=basic # mol-polecat-basic (trivial fixes)
|
||||
gt sling gt-abc gastown --quality=shiny # mol-polecat-shiny (standard)
|
||||
gt sling gt-abc gastown --quality=chrome # mol-polecat-chrome (max rigor)
|
||||
|
||||
Compare:
|
||||
gt hook <bead> # Just attach (no action)
|
||||
gt sling <bead> # Attach + start now (keep context)
|
||||
@@ -79,6 +84,7 @@ var (
|
||||
slingMolecule string // --molecule: workflow to instantiate on the bead
|
||||
slingForce bool // --force: force spawn even if polecat has unread mail
|
||||
slingAccount string // --account: Claude Code account handle to use
|
||||
slingQuality string // --quality: shorthand for polecat workflow (basic|shiny|chrome)
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -95,6 +101,7 @@ func init() {
|
||||
slingCmd.Flags().StringVar(&slingMolecule, "molecule", "", "Molecule workflow to instantiate on the bead")
|
||||
slingCmd.Flags().BoolVar(&slingForce, "force", false, "Force spawn even if polecat has unread mail")
|
||||
slingCmd.Flags().StringVar(&slingAccount, "account", "", "Claude Code account handle to use")
|
||||
slingCmd.Flags().StringVarP(&slingQuality, "quality", "q", "", "Polecat workflow quality level (basic|shiny|chrome)")
|
||||
|
||||
rootCmd.AddCommand(slingCmd)
|
||||
}
|
||||
@@ -110,6 +117,22 @@ func runSling(cmd *cobra.Command, args []string) error {
|
||||
return fmt.Errorf("--var cannot be used with --on (formula-on-bead mode doesn't support variables)")
|
||||
}
|
||||
|
||||
// --quality is shorthand for formula-on-bead with polecat workflow
|
||||
// Convert: gt sling gt-abc gastown --quality=shiny
|
||||
// To: gt sling mol-polecat-shiny --on gt-abc gastown
|
||||
if slingQuality != "" {
|
||||
qualityFormula, err := qualityToFormula(slingQuality)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// The first arg should be the bead, and we wrap it with the formula
|
||||
if slingOnTarget != "" {
|
||||
return fmt.Errorf("--quality cannot be used with --on (both specify formula)")
|
||||
}
|
||||
slingOnTarget = args[0] // The bead becomes --on target
|
||||
args[0] = qualityFormula // The formula becomes first arg
|
||||
}
|
||||
|
||||
// Determine mode based on flags and argument types
|
||||
var beadID string
|
||||
var formulaName string
|
||||
@@ -777,3 +800,17 @@ func agentIDToBeadID(agentID string) string {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
// qualityToFormula converts a quality level to the corresponding polecat workflow formula.
|
||||
func qualityToFormula(quality string) (string, error) {
|
||||
switch strings.ToLower(quality) {
|
||||
case "basic", "b":
|
||||
return "mol-polecat-basic", nil
|
||||
case "shiny", "s":
|
||||
return "mol-polecat-shiny", nil
|
||||
case "chrome", "c":
|
||||
return "mol-polecat-chrome", nil
|
||||
default:
|
||||
return "", fmt.Errorf("invalid quality level '%s' (use: basic, shiny, or chrome)", quality)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user