diff --git a/cmd/bd/formula.go b/cmd/bd/formula.go index b95733a9c..af6f5ab71 100644 --- a/cmd/bd/formula.go +++ b/cmd/bd/formula.go @@ -21,19 +21,14 @@ var formulaCmd = &cobra.Command{ Short: "Manage workflow formulas", Long: `Manage workflow formulas - the source layer for molecule templates. -Formulas are YAML/JSON files that define workflows with composition rules. -They are "cooked" into proto beads which can then be poured or wisped. - -The Rig → Cook → Run lifecycle: - - Rig: Compose formulas (extends, compose) - - Cook: Transform to proto (bd cook expands macros, applies aspects) - - Run: Agents execute poured mols or wisps +Formulas are TOML/JSON files that define workflows with composition rules. +Define formulas, cook them into protos, then pour or wisp them into work. Search paths (in order): 1. /formulas/ (active project) 2. /.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Commands: list List available formulas from all search paths @@ -50,7 +45,7 @@ Search paths (in order of priority): 1. /formulas/ (active project - highest priority) 2. /.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Formulas in earlier paths shadow those with the same name in later paths. diff --git a/cmd/bd/formula_help_test.go b/cmd/bd/formula_help_test.go new file mode 100644 index 000000000..ce5bd4386 --- /dev/null +++ b/cmd/bd/formula_help_test.go @@ -0,0 +1,35 @@ +package main + +import ( + "strings" + "testing" +) + +func TestFormulaHelpUsesGenericWorkflowLanguage(t *testing.T) { + help := formulaCmd.Long + "\n" + formulaListCmd.Long + "\n" + molSeedCmd.Long + + for _, want := range []string{ + "Formulas are TOML/JSON files", + "Define formulas, cook them into protos, then pour or wisp them into work.", + "shared workspace root", + } { + if !strings.Contains(help, want) { + t.Fatalf("formula help missing %q:\n%s", want, help) + } + } + + for _, forbidden := range []string{ + "YAML/" + "JSON files", + "Rig:", + "Formula " + "workflow:", + "Author" + ":", + "Compile: " + "Resolve", + "Instantiate: " + "Agents", + "orchestrator, if " + "GT_ROOT set", + "orchestrator level, if " + "GT_ROOT set", + } { + if strings.Contains(help, forbidden) { + t.Fatalf("formula help still contains %q:\n%s", forbidden, help) + } + } +} diff --git a/cmd/bd/mol_seed.go b/cmd/bd/mol_seed.go index e8730386c..e4f838d16 100644 --- a/cmd/bd/mol_seed.go +++ b/cmd/bd/mol_seed.go @@ -20,7 +20,7 @@ Formula search paths (checked in order): 1. /formulas/ (active project) 2. /.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user level) - 4. $GT_ROOT/.beads/formulas/ (orchestrator level, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Examples: bd mol seed mol-feature # Verify specific formula diff --git a/docs/CLI_REFERENCE.md b/docs/CLI_REFERENCE.md index 280406a88..41fa642f7 100644 --- a/docs/CLI_REFERENCE.md +++ b/docs/CLI_REFERENCE.md @@ -5437,19 +5437,14 @@ bd defer [id...] [flags] Manage workflow formulas - the source layer for molecule templates. -Formulas are YAML/JSON files that define workflows with composition rules. -They are "cooked" into proto beads which can then be poured or wisped. - -The Rig → Cook → Run lifecycle: - - Rig: Compose formulas (extends, compose) - - Cook: Transform to proto (bd cook expands macros, applies aspects) - - Run: Agents execute poured mols or wisps +Formulas are TOML/JSON files that define workflows with composition rules. +Define formulas, cook them into protos, then pour or wisp them into work. Search paths (in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Commands: list List available formulas from all search paths @@ -5498,7 +5493,7 @@ Search paths (in order of priority): 1. <resolved-beads-dir>/formulas/ (active project - highest priority) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Formulas in earlier paths shadow those with the same name in later paths. @@ -6168,7 +6163,7 @@ Formula search paths (checked in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user level) - 4. $GT_ROOT/.beads/formulas/ (orchestrator level, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Examples: bd mol seed mol-feature # Verify specific formula diff --git a/website/docs/cli-reference/formula.md b/website/docs/cli-reference/formula.md index 30f56105c..f9ef32936 100644 --- a/website/docs/cli-reference/formula.md +++ b/website/docs/cli-reference/formula.md @@ -12,19 +12,14 @@ Generated from `bd help --doc formula` Manage workflow formulas - the source layer for molecule templates. -Formulas are YAML/JSON files that define workflows with composition rules. -They are "cooked" into proto beads which can then be poured or wisped. - -The Rig → Cook → Run lifecycle: - - Rig: Compose formulas (extends, compose) - - Cook: Transform to proto (bd cook expands macros, applies aspects) - - Run: Agents execute poured mols or wisps +Formulas are TOML/JSON files that define workflows with composition rules. +Define formulas, cook them into protos, then pour or wisp them into work. Search paths (in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Commands: list List available formulas from all search paths @@ -73,7 +68,7 @@ Search paths (in order of priority): 1. <resolved-beads-dir>/formulas/ (active project - highest priority) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Formulas in earlier paths shadow those with the same name in later paths. diff --git a/website/docs/cli-reference/mol.md b/website/docs/cli-reference/mol.md index 406dca7de..e568a7847 100644 --- a/website/docs/cli-reference/mol.md +++ b/website/docs/cli-reference/mol.md @@ -333,7 +333,7 @@ Formula search paths (checked in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user level) - 4. $GT_ROOT/.beads/formulas/ (orchestrator level, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Examples: bd mol seed mol-feature # Verify specific formula diff --git a/website/versioned_docs/version-1.0.0/cli-reference/formula.md b/website/versioned_docs/version-1.0.0/cli-reference/formula.md index 30f56105c..f9ef32936 100644 --- a/website/versioned_docs/version-1.0.0/cli-reference/formula.md +++ b/website/versioned_docs/version-1.0.0/cli-reference/formula.md @@ -12,19 +12,14 @@ Generated from `bd help --doc formula` Manage workflow formulas - the source layer for molecule templates. -Formulas are YAML/JSON files that define workflows with composition rules. -They are "cooked" into proto beads which can then be poured or wisped. - -The Rig → Cook → Run lifecycle: - - Rig: Compose formulas (extends, compose) - - Cook: Transform to proto (bd cook expands macros, applies aspects) - - Run: Agents execute poured mols or wisps +Formulas are TOML/JSON files that define workflows with composition rules. +Define formulas, cook them into protos, then pour or wisp them into work. Search paths (in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Commands: list List available formulas from all search paths @@ -73,7 +68,7 @@ Search paths (in order of priority): 1. <resolved-beads-dir>/formulas/ (active project - highest priority) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Formulas in earlier paths shadow those with the same name in later paths. diff --git a/website/versioned_docs/version-1.0.0/cli-reference/mol.md b/website/versioned_docs/version-1.0.0/cli-reference/mol.md index 406dca7de..e568a7847 100644 --- a/website/versioned_docs/version-1.0.0/cli-reference/mol.md +++ b/website/versioned_docs/version-1.0.0/cli-reference/mol.md @@ -333,7 +333,7 @@ Formula search paths (checked in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user level) - 4. $GT_ROOT/.beads/formulas/ (orchestrator level, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Examples: bd mol seed mol-feature # Verify specific formula diff --git a/website/versioned_docs/version-1.0.4/cli-reference/formula.md b/website/versioned_docs/version-1.0.4/cli-reference/formula.md index 30f56105c..f9ef32936 100644 --- a/website/versioned_docs/version-1.0.4/cli-reference/formula.md +++ b/website/versioned_docs/version-1.0.4/cli-reference/formula.md @@ -12,19 +12,14 @@ Generated from `bd help --doc formula` Manage workflow formulas - the source layer for molecule templates. -Formulas are YAML/JSON files that define workflows with composition rules. -They are "cooked" into proto beads which can then be poured or wisped. - -The Rig → Cook → Run lifecycle: - - Rig: Compose formulas (extends, compose) - - Cook: Transform to proto (bd cook expands macros, applies aspects) - - Run: Agents execute poured mols or wisps +Formulas are TOML/JSON files that define workflows with composition rules. +Define formulas, cook them into protos, then pour or wisp them into work. Search paths (in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Commands: list List available formulas from all search paths @@ -73,7 +68,7 @@ Search paths (in order of priority): 1. <resolved-beads-dir>/formulas/ (active project - highest priority) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user) - 4. $GT_ROOT/.beads/formulas/ (orchestrator, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Formulas in earlier paths shadow those with the same name in later paths. diff --git a/website/versioned_docs/version-1.0.4/cli-reference/mol.md b/website/versioned_docs/version-1.0.4/cli-reference/mol.md index 406dca7de..e568a7847 100644 --- a/website/versioned_docs/version-1.0.4/cli-reference/mol.md +++ b/website/versioned_docs/version-1.0.4/cli-reference/mol.md @@ -333,7 +333,7 @@ Formula search paths (checked in order): 1. <resolved-beads-dir>/formulas/ (active project) 2. <checkout-root>/.beads/formulas/ (repo-local formulas) 3. ~/.beads/formulas/ (user level) - 4. $GT_ROOT/.beads/formulas/ (orchestrator level, if GT_ROOT set) + 4. $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set) Examples: bd mol seed mol-feature # Verify specific formula