mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
cleanup
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
version: 1.0.0
|
||||
title: Initialize Work
|
||||
description: Initialize a repository with workflow structure and basic scaffolding
|
||||
instructions: |
|
||||
You are Goose Swarm agent working on a github repo {{ repo }}.
|
||||
Your job is to analyze issue #{{ issue_number }} and create initial scaffolding and workflow structure
|
||||
since the repository is new.
|
||||
|
||||
Context:
|
||||
- Issue: {{ issue_number }}
|
||||
- Repository directory {{ repo_dir }} ready to work in
|
||||
|
||||
|
||||
IMPORTANT: This repository is a brand new project, you will be choosing and implementing an initial scaffolding (non functional) and a simple github pipeline to validate this.
|
||||
|
||||
|
||||
prompt: |
|
||||
I need to initialize and scaffold the following project description:
|
||||
|
||||
{{ context }}
|
||||
|
||||
|
||||
Based on what you can tell, you are to select from one of the following template repos to help get started:
|
||||
|
||||
https://github.com/t3-oss/create-t3-app - typescript template
|
||||
https://github.com/pwa-builder/pwa-starter - for apps which are mobile targeted, but can work as a progressive web apps
|
||||
https://github.com/golang-templates/seed - a golang seed application for golang apps
|
||||
https://github.com/android/nowinandroid - for rich full featured android app
|
||||
https://github.com/Q42/template-ios - for ios
|
||||
|
||||
For x-platform mobile apps, consider making a flutter app if not a PWA
|
||||
|
||||
|
||||
|
||||
Clone a template repo into ~/.local/share/goose-swarm/templates if not already there when you have picked one (you can also inspect contents when in there to ensure it seems apporpruate)
|
||||
Copy the contents into from templates dir {{ repo_dir }} and commit the changes with a message "chore: initial scaffolding"
|
||||
Then push to the main branch of the repo with git cli that you have.
|
||||
|
||||
use this pattern to sync it:
|
||||
|
||||
`rsync -a --exclude='.git/' ~/.local/share/goose-swarm/templates/<chosen-template>/ {{ repo_dir }}/`
|
||||
`git add . && git commit -m "chore: initial scaffolding" && git push origin main`
|
||||
|
||||
@@ -19,7 +19,6 @@ use tokio::time::{sleep, Duration};
|
||||
const PLAN_WORK_RECIPE: &str = include_str!("goose_swarm/plan_work.yaml");
|
||||
const SWARM_DRONE_RECIPE: &str = include_str!("goose_swarm/swarm_drone.yaml");
|
||||
const EVALUATE_RECIPE: &str = include_str!("goose_swarm/evaluate.yaml");
|
||||
const INIT_WORK_RECIPE: &str = include_str!("goose_swarm/init_work.yaml");
|
||||
|
||||
/// Orchestrate parallel work on GitHub issues using swarm intelligence
|
||||
#[derive(Args, Debug)]
|
||||
@@ -291,11 +290,6 @@ fn prepare_workspace(repo: &str, worker_id: &str) -> Result<String> {
|
||||
Ok(workspace_dir)
|
||||
}
|
||||
|
||||
/// Check if the repository has a .workflow directory
|
||||
fn has_workflow_directory(repo_dir: &str) -> bool {
|
||||
let workflow_path = format!("{}/.workflow", repo_dir);
|
||||
std::path::Path::new(&workflow_path).exists()
|
||||
}
|
||||
|
||||
/// Process task files in tasks/ directory to create [task] issues
|
||||
/// Returns the number of task issues created
|
||||
@@ -439,13 +433,6 @@ async fn execute_planning_work(repo: &str, issue: &GitHubIssue, worker_id: &str)
|
||||
|
||||
prepare_task_directories(&tasks_dir, &issues_dir)?;
|
||||
|
||||
// Check if .workflow directory exists and run initialization recipe if needed
|
||||
if !has_workflow_directory(&repo_dir) {
|
||||
println!("🚀 No .workflow directory found, running initialization recipe first...");
|
||||
} else {
|
||||
println!("📂 Found .workflow directory, skipping initialization.");
|
||||
}
|
||||
|
||||
// Build recipe parameters for planning
|
||||
let params = vec![
|
||||
("repo".to_string(), repo.to_string()),
|
||||
@@ -456,12 +443,6 @@ async fn execute_planning_work(repo: &str, issue: &GitHubIssue, worker_id: &str)
|
||||
("repo_dir".to_string(), repo_dir.clone()), // Pass the cloned repo directory
|
||||
];
|
||||
|
||||
// Run initialization recipe if needed
|
||||
if !has_workflow_directory(&repo_dir) {
|
||||
run_recipe(INIT_WORK_RECIPE, params.clone()).await?;
|
||||
println!("✅ Initialization recipe complete.");
|
||||
}
|
||||
|
||||
// Run the standard planning recipe to create tasks
|
||||
println!("🎯 Running standard planning recipe to break down the issue...");
|
||||
run_recipe(PLAN_WORK_RECIPE, params).await?;
|
||||
|
||||
Reference in New Issue
Block a user