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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trackfw",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "description": "CLI de governança para entrega de software: ADR → REQ → ROADMAP → kanban. Suporte nativo a agentes de IA (Claude Code, Gemini CLI, Cursor).",
5
5
  "keywords": [
6
6
  "cli",
@@ -99,7 +99,27 @@ function getContext(format) {
99
99
  }
100
100
 
101
101
  // REQs
102
- const reqs = collectEntries(cfg.reqDir || 'docs/req', 'REQ')
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 = []