ππΌββοΈ The blackboard for coding agents - agentic development environment for claude code, codex, cursor, opencode, grok and more.
Rust adeai-agentsclaudeclaude-codecodexcursorgeminigrokopencodespec-driven-developmentvibe-codingvim
refactor: improve agtx plugin prompting (#32)
Fynn FlΓΌggeb7f406a56962
diff --git a/plugins/agtx/plugin.toml b/plugins/agtx/plugin.tomlindex 8f15865..8690b65 100644--- a/plugins/agtx/plugin.toml+++ b/plugins/agtx/plugin.toml@@ -8,12 +8,7 @@ running = ".agtx/execute.md"review = ".agtx/review.md"[commands]-research = "/agtx:research"-planning = "/agtx:plan"-running = "/agtx:execute"+research = "/agtx:research {task}"+planning = "/agtx:plan {task}"+running = "/agtx:execute {task}"review = "/agtx:review"--[prompts]-research = "Task: {task}"-planning = "Task: {task}"-running = "Task: {task}"diff --git a/plugins/agtx/skills/execute.md b/plugins/agtx/skills/execute.mdindex f088697..3d06ebd 100644--- a/plugins/agtx/skills/execute.md+++ b/plugins/agtx/skills/execute.md@@ -7,14 +7,18 @@ description: Execute an approved implementation plan. Implement the changes, theYou are in the **execution phase** of an agtx-managed task.+## Input++- **Task description** β provided inline with this command (when entering directly from Backlog)+- **`.agtx/plan.md`** β approved implementation plan (when planning was completed first)+## Instructions-1. Check if `.agtx/plan.md` exists:- - **If it exists**: read it β it contains the approved implementation plan. Proceed to step 2.- - **If it does not exist**: **wait for the next message** β it contains the task description. Do not proceed until you receive it.-2. Implement the changes-3. Run relevant tests to verify your changes-4. Fix any issues found during testing+1. If `.agtx/plan.md` exists, read it for the approved plan+2. Read and understand the task description+3. Implement the changes+4. Run relevant tests to verify your changes+5. Fix any issues found during testing## Outputdiff --git a/plugins/agtx/skills/plan.md b/plugins/agtx/skills/plan.mdindex d035461..3e6d7f4 100644--- a/plugins/agtx/skills/plan.md+++ b/plugins/agtx/skills/plan.md@@ -7,11 +7,15 @@ description: Plan a task implementation. Analyze the codebase, create a detailedYou are in the **planning phase** of an agtx-managed task.+## Input++- **Task description** β provided inline with this command (when entering directly from Backlog)+- **`.agtx/research.md`** β prior analysis from research phase (when research was completed first)+## Instructions-1. Check if `.agtx/research.md` exists:- - **If it exists**: read it first β it contains the task description and prior analysis. Proceed to step 2.- - **If it does not exist**: **wait for the next message** β it contains the task description. Do not proceed until you receive it.+1. If `.agtx/research.md` exists, read it for prior analysis+2. Read and understand the task description3. Explore the codebase to understand relevant files, patterns, and architecture4. Identify all files that need to be created or modified5. Create a detailed implementation plandiff --git a/plugins/agtx/skills/research.md b/plugins/agtx/skills/research.mdindex cb378e2..d58979a 100644--- a/plugins/agtx/skills/research.md+++ b/plugins/agtx/skills/research.md@@ -7,11 +7,14 @@ description: Explore the codebase to understand a task before planning. Write fiYou are in the **research phase** of an agtx-managed task. This is a read-only exploration.+## Input++- **Task description** β provided inline with this command+## Instructions-1. **Wait for the next message** β it contains the task title, description, and artifact path. Do not start working until you receive it.-2. Read and understand the task description-3. Explore the codebase to find relevant files, patterns, and architecture+1. Read and understand the task description+2. Explore the codebase to find relevant files, patterns, and architecture4. Identify dependencies, related code, and potential complexity5. Assess feasibility and estimate scopediff --git a/src/tui/app.rs b/src/tui/app.rsindex 213d4b3..21a3d27 100644--- a/src/tui/app.rs+++ b/src/tui/app.rs@@ -3264,9 +3264,9 @@ impl App {let (running_agent, agent_switch) = needs_agent_switch(&self.state.config, task, "running");let task_content = task.content_text();let run_phase = determine_phase_variant("running", task.worktree_path.as_deref(), &task.id, &plugin, task.cycle);- let skill_cmd = resolve_skill_command(&plugin, "running", &running_agent, &task_content, task.cycle);+ let skill_cmd = resolve_skill_command(&plugin, run_phase, &running_agent, &task_content, task.cycle);let prompt = resolve_prompt(&plugin, run_phase, &task_content, &task.id, task.cycle);- let prompt_trigger = resolve_prompt_trigger(&plugin, "running");+ let prompt_trigger = resolve_prompt_trigger(&plugin, run_phase);let auto_dismiss = plugin.as_ref().map_or_else(Vec::new, |p| p.auto_dismiss.clone());spawn_send_to_agent(Arc::clone(&self.state.tmux_ops),diff --git a/src/tui/app_tests.rs b/src/tui/app_tests.rsindex 4f53bde..7b6cfdc 100644--- a/src/tui/app_tests.rs+++ b/src/tui/app_tests.rs@@ -1748,29 +1748,15 @@ fn test_transform_skill_frontmatter_no_agtx() {}#[test]-fn test_resolve_prompt_with_template() {+fn test_resolve_prompt_agtx_no_prompts() {+ // agtx plugin has no prompts β task is embedded in the commandlet plugin = skills::load_bundled_plugin("agtx");let prompt = resolve_prompt(&plugin, "planning", "my task", "task-123", 1);- assert!(prompt.contains("my task"));- assert!(!prompt.contains("SKILL.md"));-}--#[test]-fn test_resolve_prompt_research_has_task() {- let plugin = skills::load_bundled_plugin("agtx");+ assert!(prompt.is_empty());let prompt = resolve_prompt(&plugin, "research", "my task", "abc-123", 1);- assert!(prompt.contains("my task"));- // Claude should NOT have skill ref in prompt (sent via send_keys)- assert!(!prompt.contains("/agtx:research"));-}--#[test]-fn test_resolve_prompt_running_phase() {- let plugin = skills::load_bundled_plugin("agtx");- // running = direct from Backlog, needs task prompt+ assert!(prompt.is_empty());let prompt = resolve_prompt(&plugin, "running", "my task", "task-123", 1);- assert_eq!(prompt, "Task: my task");- // running_with_research_or_planning = after prior phase, no prompt needed+ assert!(prompt.is_empty());let prompt = resolve_prompt(&plugin, "running_with_research_or_planning", "my task", "task-123", 1);assert!(prompt.is_empty());}@@ -1810,9 +1796,9 @@ fn test_agtx_plugin_artifacts() {#[test]fn test_agtx_plugin_has_commands() {let plugin = skills::load_bundled_plugin("agtx").expect("agtx plugin should load");- assert_eq!(plugin.commands.research.as_deref(), Some("/agtx:research"));- assert_eq!(plugin.commands.planning.as_deref(), Some("/agtx:plan"));- assert_eq!(plugin.commands.running.as_deref(), Some("/agtx:execute"));+ assert_eq!(plugin.commands.research.as_deref(), Some("/agtx:research {task}"));+ assert_eq!(plugin.commands.planning.as_deref(), Some("/agtx:plan {task}"));+ assert_eq!(plugin.commands.running.as_deref(), Some("/agtx:execute {task}"));assert_eq!(plugin.commands.review.as_deref(), Some("/agtx:review"));}