trackfw 2.5.3 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/context.js +21 -1
package/package.json
CHANGED
package/src/commands/context.js
CHANGED
|
@@ -99,7 +99,27 @@ function getContext(format) {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// REQs
|
|
102
|
-
const reqs =
|
|
102
|
+
const reqs = []
|
|
103
|
+
const reqDir = cfg.reqDir || cfg.req_dir || 'docs/req'
|
|
104
|
+
const reqNamespacing = cfg.roadmapNamespacing || cfg.roadmap_namespacing || ''
|
|
105
|
+
if (reqNamespacing === 'by_agent') {
|
|
106
|
+
const STATES = ['backlog', 'wip', 'blocked', 'done', 'abandoned']
|
|
107
|
+
let agents = cfg.agents || []
|
|
108
|
+
if (!agents.length) {
|
|
109
|
+
try {
|
|
110
|
+
agents = fs.readdirSync(reqDir).filter(f => {
|
|
111
|
+
try { return fs.statSync(path.join(reqDir, f)).isDirectory() } catch (_) { return false }
|
|
112
|
+
})
|
|
113
|
+
} catch (_) {}
|
|
114
|
+
}
|
|
115
|
+
for (const agent of agents) {
|
|
116
|
+
for (const state of STATES) {
|
|
117
|
+
reqs.push(...collectEntries(path.join(reqDir, agent, state), 'REQ', state))
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
reqs.push(...collectEntries(reqDir, 'REQ'))
|
|
122
|
+
}
|
|
103
123
|
|
|
104
124
|
// Roadmaps
|
|
105
125
|
const roadmaps = []
|