Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Codex receives Boatstack operation drivers

Codex installations and detached controllers now include the same operation-specific Boatstack skills as other supported coding hosts. A `boatstack-run` session can follow the released planning, preflight, build, evidence, review, and PR boundaries instead of inferring those transitions from the generic adapter.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,16 @@ description: %s
`, spec.Name, spec.Description, argumentHint, strings.TrimSpace(operationBody), arguments)
}

func codexOperationSkill(spec claudeSkillSpec, operationBody string) string {
return fmt.Sprintf(`---
name: %s
description: %s
---

%s
`, spec.Name, spec.Description, strings.TrimSpace(operationBody))
}

func BuildExportBundle(configPath string, config ProjectConfig, rawConfig []byte, adapterName string) (ExportBundle, error) {
if !adapterNamePattern.MatchString(adapterName) {
return ExportBundle{}, fmt.Errorf("adapter name must be a lowercase kebab-case slug")
Expand Down Expand Up @@ -518,6 +528,19 @@ If gstack is enabled, use only its namespaced /gstack-* specialist lenses inside
if err != nil {
return ExportBundle{}, err
}
for _, spec := range claudeVisibleSkills {
extra, ok := operations[spec.Name]
if !ok {
return ExportBundle{}, fmt.Errorf("missing operation instructions for Codex skill %s", spec.Name)
}
path := fmt.Sprintf(".agents/skills/%s/SKILL.md", spec.Name)
files[path], err = GeneratedFrontmatter(
codexOperationSkill(spec, commandBody(spec.Name, extra)),
)
if err != nil {
return ExportBundle{}, err
}
}
}
if contains(adapters, "github") {
files[fmt.Sprintf(".github/PULL_REQUEST_TEMPLATE/%s.md", adapterName)] = GeneratedMarkdown(`# Reviewer-ready change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ func TestExportAndDriftCheck(t *testing.T) {
".gemini/skills/auto-plan/SKILL.md",
".gemini/skills/boatstack-update/SKILL.md",
".agents/skills/boatstack/SKILL.md",
".agents/skills/boatstack-run/SKILL.md",
".agents/skills/auto-plan/SKILL.md",
".product-loop/.gitignore",
".product-loop/templates/plan.md",
".product-loop/templates/approval.md",
Expand Down Expand Up @@ -163,6 +165,40 @@ func TestExportAndDriftCheck(t *testing.T) {
}
}

codexSkillPaths := map[string]bool{}
for path := range bundle.Files {
if strings.HasPrefix(path, ".agents/skills/") && strings.HasSuffix(path, "/SKILL.md") {
codexSkillPaths[path] = true
}
}
if len(codexSkillPaths) != len(claudeVisibleSkills)+1 {
t.Fatalf("generated %d Codex skills, want %d: %#v", len(codexSkillPaths), len(claudeVisibleSkills)+1, codexSkillPaths)
}
for _, spec := range claudeVisibleSkills {
path := ".agents/skills/" + spec.Name + "/SKILL.md"
skill := string(bundle.Files[path])
for _, expected := range []string{
"name: " + spec.Name,
"description: " + spec.Description,
"Run the " + spec.Name + " operation",
".product-loop/workflow.md",
"User-facing response contract",
} {
if !strings.Contains(skill, expected) {
t.Fatalf("%s is missing %q", path, expected)
}
}
}
codexRun := string(bundle.Files[".agents/skills/boatstack-run/SKILL.md"])
for _, expected := range []string{
"If status is NOT_STARTED, route to auto-plan",
"planning and plan-gate do not require delivery preflight",
} {
if !strings.Contains(codexRun, expected) {
t.Fatalf("Codex boatstack-run skill is missing operation boundary %q", expected)
}
}

geminiSkillPaths := map[string]bool{}
for path := range bundle.Files {
if strings.HasPrefix(path, ".gemini/skills/") && strings.HasSuffix(path, "/SKILL.md") {
Expand Down Expand Up @@ -495,6 +531,9 @@ func TestPortableHostAdaptersShareWorkflowAndArtifactContract(t *testing.T) {
if _, exists := bundle.Files[".gemini/skills/"+spec.Name+"/SKILL.md"]; !exists {
t.Fatalf("Gemini does not expose user operation %q", spec.Name)
}
if _, exists := bundle.Files[".agents/skills/"+spec.Name+"/SKILL.md"]; !exists {
t.Fatalf("Codex does not expose user operation %q", spec.Name)
}
}
for _, expected := range []string{"source plan", "plan.md", "approval.md", "evidence", "gaps", "review", "pr.md"} {
if !strings.Contains(strings.ToLower(artifacts), strings.ToLower(expected)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestGeneratedSkillFrontmatterIsValidYAML(t *testing.T) {
expected += len(claudeVisibleSkills) + 1
}
if contains(config.Adapters, "codex") {
expected += 1
expected += len(claudeVisibleSkills) + 1
}
if skillCount != expected {
t.Fatalf("validated %d generated skills, want %d", skillCount, expected)
Expand Down
Loading