MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / listAvailablePRDs

Function listAvailablePRDs

cmd/chief/main.go:106–123  ·  view source on GitHub ↗

listAvailablePRDs returns all PRD names in .chief/prds/

()

Source from the content-addressed store, hash-verified

104
105// listAvailablePRDs returns all PRD names in .chief/prds/
106func 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),

Callers 1

runTUIWithOptionsFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected