roadmapsmith 0.9.23 → 0.9.24
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/skills.json +11 -11
- package/src/sync/index.js +93 -4
- package/src/validator/index.js +23 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roadmapsmith",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "One-command evidence-backed ROADMAP.md generator and sync tool for AI coding agents, with shared RoadmapSmith plugin skills for Codex and Claude.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "PapiScholz"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roadmapsmith",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "One-command evidence-backed ROADMAP.md generator and sync tool for AI coding agents, with shared RoadmapSmith plugin skills for Codex and Claude.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "PapiScholz"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roadmapsmith",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "One-command evidence-backed ROADMAP.md generator and sync tool for AI coding agents, with shared RoadmapSmith plugin skills for Codex and Claude.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/skills.json
CHANGED
|
@@ -29,67 +29,67 @@
|
|
|
29
29
|
"name": "roadmap",
|
|
30
30
|
"path": "skills/roadmap",
|
|
31
31
|
"description": "Native slash palette for RoadmapSmith commands and recommended entrypoints across supported hosts.",
|
|
32
|
-
"version": "0.9.
|
|
32
|
+
"version": "0.9.24"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"name": "roadmap-zero",
|
|
36
36
|
"path": "skills/roadmap-zero",
|
|
37
37
|
"description": "Native slash entrypoint for the one-command Zero Mode CLI workflow.",
|
|
38
|
-
"version": "0.9.
|
|
38
|
+
"version": "0.9.24"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"name": "roadmap-maintain",
|
|
42
42
|
"path": "skills/roadmap-maintain",
|
|
43
43
|
"description": "Native slash entrypoint for the preserve-first generate + sync + audit flow.",
|
|
44
|
-
"version": "0.9.
|
|
44
|
+
"version": "0.9.24"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"name": "roadmap-status",
|
|
48
48
|
"path": "skills/roadmap-status",
|
|
49
49
|
"description": "Native slash readiness check grounded in roadmapsmith doctor JSON.",
|
|
50
|
-
"version": "0.9.
|
|
50
|
+
"version": "0.9.24"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"name": "roadmap-init",
|
|
54
54
|
"path": "skills/roadmap-init",
|
|
55
55
|
"description": "Native slash entrypoint for creating ROADMAP.md and AGENTS.md.",
|
|
56
|
-
"version": "0.9.
|
|
56
|
+
"version": "0.9.24"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"name": "roadmap-generate",
|
|
60
60
|
"path": "skills/roadmap-generate",
|
|
61
61
|
"description": "Native slash entrypoint for managed roadmap updates that require --full-regen before destructive replacement.",
|
|
62
|
-
"version": "0.9.
|
|
62
|
+
"version": "0.9.24"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"name": "roadmap-validate",
|
|
66
66
|
"path": "skills/roadmap-validate",
|
|
67
67
|
"description": "Native slash entrypoint for evidence-backed roadmap validation.",
|
|
68
|
-
"version": "0.9.
|
|
68
|
+
"version": "0.9.24"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"name": "roadmap-update",
|
|
72
72
|
"path": "skills/roadmap-update",
|
|
73
73
|
"description": "Native slash entrypoint for applying evidence-backed checklist sync.",
|
|
74
|
-
"version": "0.9.
|
|
74
|
+
"version": "0.9.24"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"name": "roadmap-sync",
|
|
78
78
|
"path": "skills/roadmap-sync",
|
|
79
79
|
"description": "Legacy namespaced root plus policy guidance for RoadmapSmith slash workflows.",
|
|
80
|
-
"version": "0.9.
|
|
80
|
+
"version": "0.9.24"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"name": "roadmap-audit",
|
|
84
84
|
"path": "skills/roadmap-audit",
|
|
85
85
|
"description": "Native slash entrypoint for the current sync-plus-audit workflow.",
|
|
86
|
-
"version": "0.9.
|
|
86
|
+
"version": "0.9.24"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"name": "roadmap-setup",
|
|
90
90
|
"path": "skills/roadmap-setup",
|
|
91
91
|
"description": "Native slash entrypoint for generating RoadmapSmith host integration files.",
|
|
92
|
-
"version": "0.9.
|
|
92
|
+
"version": "0.9.24"
|
|
93
93
|
}
|
|
94
94
|
]
|
|
95
95
|
}
|
package/src/sync/index.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const { parseRoadmap } = require('../parser');
|
|
4
4
|
const { ensureTrailingNewline } = require('../utils');
|
|
5
5
|
|
|
6
|
+
const WARNING_REASON_PREFIX = 'attempted but validation failed:';
|
|
7
|
+
|
|
6
8
|
function setChecklistState(line, checked) {
|
|
7
9
|
return line.replace(/- \[( |x|X)\]/, `- [${checked ? 'x' : ' '}]`);
|
|
8
10
|
}
|
|
@@ -11,6 +13,95 @@ function formatWarning(indent, reason) {
|
|
|
11
13
|
return `${indent} - ⚠️ attempted but validation failed: ${reason}`;
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
function isWhitespaceCharacter(char) {
|
|
17
|
+
return char === ' ' || char === '\t' || char === '\n' || char === '\r' || char === '\f' || char === '\v';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function stripLeadingWarningMarker(value) {
|
|
21
|
+
let index = 0;
|
|
22
|
+
const source = String(value || '');
|
|
23
|
+
while (index < source.length && isWhitespaceCharacter(source[index])) {
|
|
24
|
+
index += 1;
|
|
25
|
+
}
|
|
26
|
+
if (source.slice(index, index + 2) === '⚠️') {
|
|
27
|
+
index += 2;
|
|
28
|
+
}
|
|
29
|
+
while (index < source.length && isWhitespaceCharacter(source[index])) {
|
|
30
|
+
index += 1;
|
|
31
|
+
}
|
|
32
|
+
return source.slice(index);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function splitWarningReasonSegments(value) {
|
|
36
|
+
const source = String(value || '');
|
|
37
|
+
const segments = [];
|
|
38
|
+
let current = '';
|
|
39
|
+
let index = 0;
|
|
40
|
+
|
|
41
|
+
while (index < source.length) {
|
|
42
|
+
const char = source[index];
|
|
43
|
+
if (char === ';') {
|
|
44
|
+
const trimmed = current.trim();
|
|
45
|
+
if (trimmed) {
|
|
46
|
+
segments.push(trimmed);
|
|
47
|
+
}
|
|
48
|
+
current = '';
|
|
49
|
+
index += 1;
|
|
50
|
+
while (index < source.length && isWhitespaceCharacter(source[index])) {
|
|
51
|
+
index += 1;
|
|
52
|
+
}
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
current += char;
|
|
57
|
+
index += 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const trimmed = current.trim();
|
|
61
|
+
if (trimmed) {
|
|
62
|
+
segments.push(trimmed);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return segments;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function normalizeWarningReason(reason) {
|
|
69
|
+
let normalized = String(reason || '').trim();
|
|
70
|
+
if (!normalized) {
|
|
71
|
+
return '';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
normalized = stripLeadingWarningMarker(normalized).trim();
|
|
75
|
+
const prefixIndex = normalized.indexOf(WARNING_REASON_PREFIX);
|
|
76
|
+
if (prefixIndex >= 0) {
|
|
77
|
+
normalized = normalized.slice(prefixIndex + WARNING_REASON_PREFIX.length).trim();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return normalized;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function normalizeWarningReasons(reasons) {
|
|
84
|
+
const normalized = [];
|
|
85
|
+
const seen = new Set();
|
|
86
|
+
for (const reason of Array.isArray(reasons) ? reasons : [reasons]) {
|
|
87
|
+
for (const chunk of splitWarningReasonSegments(reason)) {
|
|
88
|
+
const clean = normalizeWarningReason(chunk);
|
|
89
|
+
if (!clean || seen.has(clean)) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
seen.add(clean);
|
|
93
|
+
normalized.push(clean);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return normalized;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function shouldPreserveExistingWarning(existingReason, newReason) {
|
|
100
|
+
const cleanExisting = normalizeWarningReason(existingReason);
|
|
101
|
+
const cleanNew = normalizeWarningReason(newReason) || 'validation failed';
|
|
102
|
+
return cleanNew === 'validation failed' && cleanExisting && cleanExisting !== cleanNew;
|
|
103
|
+
}
|
|
104
|
+
|
|
14
105
|
function applySync(content, parsedTasks, results) {
|
|
15
106
|
const parsed = parseRoadmap(content);
|
|
16
107
|
const lines = [...parsed.lines];
|
|
@@ -30,7 +121,7 @@ function applySync(content, parsedTasks, results) {
|
|
|
30
121
|
|
|
31
122
|
lines[lineIndex] = setChecklistState(lines[lineIndex], result.passed);
|
|
32
123
|
|
|
33
|
-
const reason = result.reasons.join('; ');
|
|
124
|
+
const reason = normalizeWarningReasons(result.reasons).join('; ');
|
|
34
125
|
const warningText = formatWarning(task.indent || '', reason || 'validation failed');
|
|
35
126
|
const hasWarning = task.warningLineIndex != null;
|
|
36
127
|
const warningIndex = hasWarning ? task.warningLineIndex + offset : null;
|
|
@@ -47,9 +138,7 @@ function applySync(content, parsedTasks, results) {
|
|
|
47
138
|
if (warningIndex != null && warningIndex >= 0 && warningIndex < lines.length) {
|
|
48
139
|
const existingReason = lines[warningIndex].split('validation failed:')[1];
|
|
49
140
|
const newReason = reason || 'validation failed';
|
|
50
|
-
|
|
51
|
-
const existingIsMoreSpecific = existingReason && existingReason.trim().length > newReason.length;
|
|
52
|
-
if (!existingIsMoreSpecific) {
|
|
141
|
+
if (!shouldPreserveExistingWarning(existingReason, newReason)) {
|
|
53
142
|
lines[warningIndex] = warningText;
|
|
54
143
|
}
|
|
55
144
|
} else {
|
package/src/validator/index.js
CHANGED
|
@@ -373,6 +373,10 @@ function isDocTask(taskText) {
|
|
|
373
373
|
return /\b(add|create|write|update|init|initialize|introduce|setup|document)\b/.test(normalized);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
function isImplementationTask(taskText) {
|
|
377
|
+
return !isDocTask(taskText) && (isCodeTask(taskText) || taskDescribesChange(taskText));
|
|
378
|
+
}
|
|
379
|
+
|
|
376
380
|
function findFilesByPathHints(pathHints, fileIndex) {
|
|
377
381
|
const matches = [];
|
|
378
382
|
for (const hint of pathHints) {
|
|
@@ -1177,7 +1181,13 @@ function validateTask(task, context, config, plugins) {
|
|
|
1177
1181
|
uniqueReasons = Array.isArray(overrideResult.reasons) ? Array.from(new Set(overrideResult.reasons)) : [];
|
|
1178
1182
|
}
|
|
1179
1183
|
|
|
1180
|
-
const
|
|
1184
|
+
const hasConcreteReferenceEvidence = filesFromPurePathHints.length > 0 || filesFromSymbols.length > 0;
|
|
1185
|
+
const attempted = authoritativeEvidence.active
|
|
1186
|
+
|| hasRuleGrantedEvidence
|
|
1187
|
+
|| evidence.code
|
|
1188
|
+
|| evidence.test
|
|
1189
|
+
|| evidence.artifact
|
|
1190
|
+
|| hasConcreteReferenceEvidence;
|
|
1181
1191
|
const { categories: strongEvidenceCategories } = countStrongEvidenceCategories(task.text, evidence);
|
|
1182
1192
|
const strongEvidenceCount = strongEvidenceCategories.length;
|
|
1183
1193
|
// Only pure path hints (not line-reference hints like file.ts:169) count as direct evidence.
|
|
@@ -1220,6 +1230,7 @@ function validateTask(task, context, config, plugins) {
|
|
|
1220
1230
|
// WHERE to implement, not that implementation is done. Unchecked tasks need authoritative
|
|
1221
1231
|
// evidence, artifact evidence, or strong code+test threshold to pass.
|
|
1222
1232
|
// Already-checked tasks with found path hints are preserved via shouldPreserveCheckedTask.
|
|
1233
|
+
const hasHighConfidenceImplementationEvidence = meetsStrongThreshold && evidence.code && evidence.test;
|
|
1223
1234
|
let passed = authoritativeEvidence.passed || hasArtifactTaskPass || hasTrustedRuleEvidencePass || meetsStrongThreshold;
|
|
1224
1235
|
|
|
1225
1236
|
if (!passed && !task.checked && hasDirectReferencePass) {
|
|
@@ -1234,30 +1245,29 @@ function validateTask(task, context, config, plugins) {
|
|
|
1234
1245
|
// human/agent judgment that the feature is incomplete.
|
|
1235
1246
|
if (task.warningText && !task.checked && passed && !authoritativeEvidence.passed) {
|
|
1236
1247
|
passed = false;
|
|
1237
|
-
uniqueReasons.
|
|
1238
|
-
|
|
1248
|
+
if (uniqueReasons.length === 0) {
|
|
1249
|
+
uniqueReasons.push('validation failed');
|
|
1250
|
+
}
|
|
1239
1251
|
}
|
|
1240
1252
|
if (negativeSignalMatches.length > 0) {
|
|
1241
1253
|
passed = false;
|
|
1242
1254
|
}
|
|
1243
1255
|
|
|
1244
|
-
//
|
|
1245
|
-
//
|
|
1246
|
-
// Requires either: an Evidence line (authoritativeEvidence.passed), high-confidence evidence
|
|
1247
|
-
// (code + test), grant-evidence from config (hasTrustedRuleEvidencePass), or canonical artifact
|
|
1248
|
-
// evidence (hasArtifactTaskPass — e.g. "Add SECURITY.md").
|
|
1256
|
+
// Unchecked implementation tasks need explicit evidence or high-confidence implementation
|
|
1257
|
+
// evidence. Weak token overlap, direct file references, or code-only matches are not enough.
|
|
1249
1258
|
if (
|
|
1250
1259
|
!task.checked &&
|
|
1251
1260
|
passed &&
|
|
1252
|
-
|
|
1261
|
+
isImplementationTask(task.text) &&
|
|
1253
1262
|
!authoritativeEvidence.passed &&
|
|
1254
1263
|
!hasTrustedRuleEvidencePass &&
|
|
1255
|
-
!hasArtifactTaskPass
|
|
1264
|
+
!hasArtifactTaskPass &&
|
|
1265
|
+
!hasHighConfidenceImplementationEvidence
|
|
1256
1266
|
) {
|
|
1257
1267
|
passed = false;
|
|
1258
|
-
const
|
|
1259
|
-
if (!uniqueReasons.includes(
|
|
1260
|
-
uniqueReasons.push(
|
|
1268
|
+
const implementationReason = 'implementation task requires Evidence line or high-confidence evidence (code + test) to be marked complete';
|
|
1269
|
+
if (!uniqueReasons.includes(implementationReason)) {
|
|
1270
|
+
uniqueReasons.push(implementationReason);
|
|
1261
1271
|
}
|
|
1262
1272
|
}
|
|
1263
1273
|
|