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
24 changes: 9 additions & 15 deletions .agents/scripts/commands/full-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,15 @@ DECOMPOSE_HELPER="$HOME/.aidevops/agents/scripts/task-decompose-helper.sh"

# Only run if the helper exists (t1408.1 must be merged)
if [[ -x "$DECOMPOSE_HELPER" && -n "$TASK_ID" ]]; then
# Check if subtasks already exist
EXISTING=$(/bin/bash "$DECOMPOSE_HELPER" classify --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet) || EXISTING=""
EXISTING_KIND=$(echo "$EXISTING" | jq -r '.kind // "atomic"' || echo "atomic")

if [[ "$EXISTING_KIND" == "composite" ]]; then
EXISTING_SUBS=$(echo "$EXISTING" | jq -r '.existing_subtasks // empty' || echo "")
if [[ -n "$EXISTING_SUBS" && "$EXISTING_SUBS" != "[]" ]]; then
# Subtasks already exist — skip decomposition
echo "[t1408.2] Task $TASK_ID already has subtasks — proceeding with implementation"
fi
fi
# Check if subtasks already exist (returns "true" or "false")
HAS_SUBS=$(/bin/bash "$DECOMPOSE_HELPER" has-subtasks "$TASK_ID") || HAS_SUBS="false"

# If no existing subtasks, classify the task description
if [[ -z "$EXISTING_SUBS" || "$EXISTING_SUBS" == "[]" ]]; then
CLASSIFY=$(/bin/bash "$DECOMPOSE_HELPER" classify --task "$TASK_DESC" --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet) || CLASSIFY=""
if [[ "$HAS_SUBS" == "true" ]]; then
# Subtasks already exist — skip decomposition
echo "[t1408.2] Task $TASK_ID already has subtasks — proceeding with implementation"
else
# No existing subtasks — classify the task description
CLASSIFY=$(/bin/bash "$DECOMPOSE_HELPER" classify "$TASK_DESC" --depth 0) || CLASSIFY=""
TASK_KIND=$(echo "$CLASSIFY" | jq -r '.kind // "atomic"' || echo "atomic")
fi
fi
Expand All @@ -116,7 +110,7 @@ fi
Show the decomposition tree and ask for confirmation:

```bash
DECOMPOSE=$(/bin/bash "$DECOMPOSE_HELPER" decompose --task "$TASK_DESC" --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet) || DECOMPOSE=""
DECOMPOSE=$(/bin/bash "$DECOMPOSE_HELPER" decompose "$TASK_DESC" --max-subtasks "${DECOMPOSE_MAX_SUBTASKS:-5}") || DECOMPOSE=""
SUBTASK_COUNT=$(echo "$DECOMPOSE" | jq '.subtasks | length' || echo 0)
```

Expand Down
5 changes: 2 additions & 3 deletions .agents/scripts/commands/pulse.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ TASK_DESC="<issue title and first paragraph of body>"

# Classify — uses haiku-tier LLM call (~$0.001)
CLASSIFY_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh classify \
--task "$TASK_DESC" --repo-path "$path" --quiet) || CLASSIFY_RESULT=""
"$TASK_DESC" --depth 0) || CLASSIFY_RESULT=""

# Parse result
TASK_KIND=$(echo "$CLASSIFY_RESULT" | jq -r '.kind // "atomic"' || echo "atomic")
Expand All @@ -248,8 +248,7 @@ TASK_KIND=$(echo "$CLASSIFY_RESULT" | jq -r '.kind // "atomic"' || echo "atomic"
```bash
# Decompose into subtasks
DECOMPOSE_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh decompose \
--task "$TASK_DESC" --repo-path "$path" \
--depth 0 --max-depth "${DECOMPOSE_MAX_DEPTH:-3}" --quiet) || DECOMPOSE_RESULT=""
"$TASK_DESC" --max-subtasks "${DECOMPOSE_MAX_SUBTASKS:-5}") || DECOMPOSE_RESULT=""

SUBTASK_COUNT=$(echo "$DECOMPOSE_RESULT" | jq '.subtasks | length' || echo 0)
```
Expand Down
11 changes: 6 additions & 5 deletions .agents/tools/ai-assistants/headless-dispatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -712,15 +712,16 @@ classify(task, lineage)

```bash
# Classify: atomic or composite? (~$0.001, haiku tier)
task-decompose-helper.sh classify --task "Build auth with login and OAuth"
task-decompose-helper.sh classify "Build auth with login and OAuth" --depth 0
# → {"kind": "composite", "confidence": 0.9, "reasoning": "..."}

# Decompose: split into subtasks with dependency edges
task-decompose-helper.sh decompose --task "Build auth with login and OAuth"
# → {"subtasks": [{"description": "...", "depends_on": [], "estimate": "~2h"}], ...}
task-decompose-helper.sh decompose "Build auth with login and OAuth" --max-subtasks 5
# → {"subtasks": [{"description": "...", "blocked_by": []}], "strategy": "..."}

# Lineage: show ancestor/sibling context for a subtask
task-decompose-helper.sh lineage --task-id t1408.2 --repo-path ~/Git/myproject
# Format lineage: show ancestor/sibling context for a subtask
task-decompose-helper.sh format-lineage --parent "Build auth" \
--children '[{"description": "login"}, {"description": "OAuth"}]' --current 1
# → formatted hierarchy with sibling tasks
```

Expand Down
Loading