listAvailablePRDs returns all PRD names in .chief/prds/
()
| 104 | |
| 105 | // listAvailablePRDs returns all PRD names in .chief/prds/ |
| 106 | func listAvailablePRDs() []string { |
| 107 | prdsDir := ".chief/prds" |
| 108 | entries, err := os.ReadDir(prdsDir) |
| 109 | if err != nil { |
| 110 | return nil |
| 111 | } |
| 112 | |
| 113 | var names []string |
| 114 | for _, entry := range entries { |
| 115 | if entry.IsDir() { |
| 116 | prdPath := filepath.Join(prdsDir, entry.Name(), "prd.md") |
| 117 | if _, err := os.Stat(prdPath); err == nil { |
| 118 | names = append(names, entry.Name()) |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | return names |
| 123 | } |
| 124 | |
| 125 | // parseAgentFlags extracts --agent and --agent-path from args[startIdx:], |
| 126 | // returning the agent name, agent path, remaining args (with agent flags removed), |
no test coverage detected