trackfw 2.5.3 → 2.6.0
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/src/validator/index.js +6 -5
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 = []
|
package/src/validator/index.js
CHANGED
|
@@ -818,11 +818,12 @@ async function validateUnfiltered() {
|
|
|
818
818
|
applyRule('filename_uniqueness', validateFilenameUniqueness(), violations, warnings)
|
|
819
819
|
applyRule('blocked_by_draft_adr', validateREQsNotBlockedByDraftADRs(), violations, warnings)
|
|
820
820
|
|
|
821
|
-
// Regras
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
821
|
+
// Regras configuráveis via applyRule (popula _itemMeta automaticamente)
|
|
822
|
+
applyRule('req_has_adr', validateREQsHaveADR(), violations, warnings)
|
|
823
|
+
applyRule('blocked_has_req', validateBlockedHasREQ(), violations, warnings)
|
|
824
|
+
applyRule('req_has_roadmap', validateREQsHaveRoadmap(), violations, warnings)
|
|
825
|
+
|
|
826
|
+
// Regra direta (sem configuração de severidade): violation sempre
|
|
826
827
|
for (const msg of validateFrontmatterPresence()) { _setMeta(msg, 'frontmatter_presence'); violations.push(msg) }
|
|
827
828
|
|
|
828
829
|
// warnings diretos do WIP limit (não configuráveis)
|