feat(mol): add bd mol commands, deprecate bd template
Adds the mol command group for molecule workflows: - bd mol catalog - list available molecules - bd mol show <id> - show molecule structure and variables - bd mol bond <id> --var k=v - instantiate a molecule Molecules are templates with workflow semantics - they are the orchestration primitive for Gas Town. This unifies the template system under the mol command. The template commands are deprecated but still work: - bd template list -> use bd mol catalog - bd template show -> use bd mol show - bd template instantiate -> use bd mol bond Closes: bd-ffjt Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,9 +39,10 @@ type InstantiateResult struct {
|
||||
}
|
||||
|
||||
var templateCmd = &cobra.Command{
|
||||
Use: "template",
|
||||
GroupID: "setup",
|
||||
Short: "Manage issue templates",
|
||||
Use: "template",
|
||||
GroupID: "setup",
|
||||
Short: "Manage issue templates",
|
||||
Deprecated: "use 'bd mol' instead (mol catalog, mol show, mol bond)",
|
||||
Long: `Manage Beads templates for creating issue hierarchies.
|
||||
|
||||
Templates are epics with the "template" label. They can have child issues
|
||||
@@ -57,8 +58,9 @@ To use a template:
|
||||
}
|
||||
|
||||
var templateListCmd = &cobra.Command{
|
||||
Use: "list",
|
||||
Short: "List available templates",
|
||||
Use: "list",
|
||||
Short: "List available templates",
|
||||
Deprecated: "use 'bd mol catalog' instead",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := rootCtx
|
||||
var beadsTemplates []*types.Issue
|
||||
@@ -121,9 +123,10 @@ var templateListCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var templateShowCmd = &cobra.Command{
|
||||
Use: "show <template-id>",
|
||||
Short: "Show template details",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Use: "show <template-id>",
|
||||
Short: "Show template details",
|
||||
Deprecated: "use 'bd mol show' instead",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := rootCtx
|
||||
var templateID string
|
||||
@@ -193,8 +196,9 @@ func showBeadsTemplate(subgraph *TemplateSubgraph) {
|
||||
}
|
||||
|
||||
var templateInstantiateCmd = &cobra.Command{
|
||||
Use: "instantiate <template-id>",
|
||||
Short: "Create issues from a Beads template",
|
||||
Use: "instantiate <template-id>",
|
||||
Short: "Create issues from a Beads template",
|
||||
Deprecated: "use 'bd mol bond' instead",
|
||||
Long: `Instantiate a Beads template by cloning its subgraph and substituting variables.
|
||||
|
||||
Variables are specified with --var key=value flags. The template's {{key}}
|
||||
|
||||
Reference in New Issue
Block a user