feat: Add gt mol step done for auto-continuing molecule steps (gt-5gq8r)
Implements the canonical way for polecats to complete molecule steps: 1. Closes the completed step (bd close) 2. Extracts molecule ID from step ID (gt-xxx.1 -> gt-xxx) 3. Finds next ready step (dependency-aware) 4. If next step: updates hook and respawns pane 5. If complete: burns hook and signals witness This enables instant step transitions (~5-10s) vs waiting for witness patrol cycles (minutes), and ensures the activity feed stays accurate. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -305,6 +305,23 @@ a permanent (but compact) record.`,
|
||||
RunE: runMoleculeSquash,
|
||||
}
|
||||
|
||||
var moleculeStepCmd = &cobra.Command{
|
||||
Use: "step",
|
||||
Short: "Molecule step operations",
|
||||
Long: `Commands for working with molecule steps.
|
||||
|
||||
A molecule is a DAG of steps. Each step is a beads issue with the molecule root
|
||||
as its parent. Steps can have dependencies on other steps.
|
||||
|
||||
When a polecat is working on a molecule, it processes one step at a time:
|
||||
1. Work on the current step
|
||||
2. When done: gt mol step done <step-id>
|
||||
3. System auto-continues to next ready step
|
||||
|
||||
IMPORTANT: Always use 'gt mol step done' to complete steps. Do not manually
|
||||
close steps with 'bd close' - that skips the auto-continuation logic.`,
|
||||
}
|
||||
|
||||
var moleculeBondCmd = &cobra.Command{
|
||||
Use: "bond <proto-id>",
|
||||
Short: "Dynamically bond a child molecule to a running parent",
|
||||
@@ -381,6 +398,10 @@ func init() {
|
||||
moleculeBondCmd.Flags().BoolVar(&moleculeJSON, "json", false, "Output as JSON")
|
||||
moleculeBondCmd.MarkFlagRequired("parent")
|
||||
|
||||
// Add step subcommand with its children
|
||||
moleculeStepCmd.AddCommand(moleculeStepDoneCmd)
|
||||
moleculeCmd.AddCommand(moleculeStepCmd)
|
||||
|
||||
// Add subcommands
|
||||
moleculeCmd.AddCommand(moleculeStatusCmd)
|
||||
moleculeCmd.AddCommand(moleculeCurrentCmd)
|
||||
|
||||
Reference in New Issue
Block a user