nimai-core 0.2.0 → 0.3.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/dist/context.js +2 -2
- package/dist/context.js.map +1 -1
- package/dist/discovery.d.ts +11 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +101 -0
- package/dist/discovery.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +19 -0
- package/dist/lint.js.map +1 -1
- package/dist/prompts.d.ts +3 -2
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +39 -10
- package/dist/prompts.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/verdict.d.ts +39 -0
- package/dist/verdict.d.ts.map +1 -0
- package/dist/verdict.js +85 -0
- package/dist/verdict.js.map +1 -0
- package/package.json +10 -21
- package/LICENSE +0 -21
package/dist/context.js
CHANGED
|
@@ -108,8 +108,8 @@ function scoreRelevance(filename, content, keywords, relPath) {
|
|
|
108
108
|
if (DOCS_DIR_PATTERNS.some(p => rel.startsWith(p)))
|
|
109
109
|
pathBoost = -1;
|
|
110
110
|
}
|
|
111
|
-
// Nimai spec boost: files containing
|
|
112
|
-
const nimaiBoost =
|
|
111
|
+
// Nimai spec boost: files containing <!-- nimai-spec --> or <!-- nimai-spec: DATE --> marker
|
|
112
|
+
const nimaiBoost = /<!--\s*nimai-spec[:\s]/.test(content) ? 2 : 0;
|
|
113
113
|
return keywordScore + filenameBoost + pathBoost + nimaiBoost;
|
|
114
114
|
}
|
|
115
115
|
function tokenize(request) {
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAElE,OAAO,YAAY,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC;AAC/D,CAAC;AAED,SAAS,QAAQ,CAAC,OAAe;IAC/B,OAAO,OAAO;SACX,WAAW,EAAE;SACb,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface NimaiSpecFile {
|
|
2
|
+
filePath: string;
|
|
3
|
+
date: string | null;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Walk up from startDir to git root (or fs root) collecting .md files
|
|
7
|
+
* that contain the <!-- nimai-spec --> or <!-- nimai-spec: DATE --> marker.
|
|
8
|
+
* Results are sorted newest-first (dated specs first, then undated).
|
|
9
|
+
*/
|
|
10
|
+
export declare function findNimaiSpecs(startDir: string): NimaiSpecFile[];
|
|
11
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAID;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,EAAE,CAYhE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.findNimaiSpecs = findNimaiSpecs;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const NIMAI_MARKER_RE = /<!--\s*nimai-spec(?::\s*(\d{4}-\d{2}-\d{2}))?\s*-->/;
|
|
40
|
+
/**
|
|
41
|
+
* Walk up from startDir to git root (or fs root) collecting .md files
|
|
42
|
+
* that contain the <!-- nimai-spec --> or <!-- nimai-spec: DATE --> marker.
|
|
43
|
+
* Results are sorted newest-first (dated specs first, then undated).
|
|
44
|
+
*/
|
|
45
|
+
function findNimaiSpecs(startDir) {
|
|
46
|
+
const results = [];
|
|
47
|
+
const root = findGitRoot(startDir) ?? startDir;
|
|
48
|
+
walkForSpecs(root, results);
|
|
49
|
+
return results.sort((a, b) => {
|
|
50
|
+
if (a.date && b.date)
|
|
51
|
+
return b.date.localeCompare(a.date); // newest first
|
|
52
|
+
if (a.date)
|
|
53
|
+
return -1;
|
|
54
|
+
if (b.date)
|
|
55
|
+
return 1;
|
|
56
|
+
return 0;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function walkForSpecs(dir, results) {
|
|
60
|
+
let entries;
|
|
61
|
+
try {
|
|
62
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const SKIP_DIRS = new Set(['node_modules', '.git', 'dist', 'build', 'coverage', 'tmp', '.tmp']);
|
|
68
|
+
for (const entry of entries) {
|
|
69
|
+
if (entry.isDirectory()) {
|
|
70
|
+
if (!SKIP_DIRS.has(entry.name)) {
|
|
71
|
+
walkForSpecs(path.join(dir, entry.name), results);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else if (entry.isFile() && entry.name.endsWith('.md')) {
|
|
75
|
+
const filePath = path.join(dir, entry.name);
|
|
76
|
+
try {
|
|
77
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
78
|
+
const match = NIMAI_MARKER_RE.exec(content);
|
|
79
|
+
if (match) {
|
|
80
|
+
results.push({ filePath, date: match[1] ?? null });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// skip unreadable files
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function findGitRoot(startDir) {
|
|
90
|
+
let dir = startDir;
|
|
91
|
+
for (let i = 0; i < 10; i++) {
|
|
92
|
+
if (fs.existsSync(path.join(dir, '.git')))
|
|
93
|
+
return dir;
|
|
94
|
+
const parent = path.dirname(dir);
|
|
95
|
+
if (parent === dir)
|
|
96
|
+
return null;
|
|
97
|
+
dir = parent;
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wCAYC;AA3BD,uCAAyB;AACzB,2CAA6B;AAO7B,MAAM,eAAe,GAAG,qDAAqD,CAAC;AAE9E;;;;GAIG;AACH,SAAgB,cAAc,CAAC,QAAgB;IAC7C,MAAM,OAAO,GAAoB,EAAE,CAAC;IACpC,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;IAE/C,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE5B,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC3B,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe;QAC1E,IAAI,CAAC,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,GAAW,EAAE,OAAwB;IACzD,IAAI,OAAoB,CAAC;IACzB,IAAI,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,E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AAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YAAE,OAAO,GAAG,CAAC;QACtD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;QAChC,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,6 @@ __exportStar(require("./lint"), exports);
|
|
|
20
20
|
__exportStar(require("./context"), exports);
|
|
21
21
|
__exportStar(require("./prompts"), exports);
|
|
22
22
|
__exportStar(require("./clarification"), exports);
|
|
23
|
+
__exportStar(require("./discovery"), exports);
|
|
24
|
+
__exportStar(require("./verdict"), exports);
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B;AAC1B,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B;AAC1B,kDAAgC;AAChC,8CAA4B;AAC5B,4CAA0B"}
|
package/dist/lint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAiB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAiB,MAAM,SAAS,CAAC;AAkEnD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,CAQtD;AAsBD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,CA6DxD"}
|
package/dist/lint.js
CHANGED
|
@@ -40,6 +40,10 @@ const fs = __importStar(require("fs"));
|
|
|
40
40
|
const BLANK_FIELD_RE = /_{3,}/;
|
|
41
41
|
// Matches [NEEDS HUMAN INPUT...] flags
|
|
42
42
|
const NHFI_RE = /\[NEEDS HUMAN INPUT/i;
|
|
43
|
+
// Matches pre-checked list items: "- [x] ..." or "* [x] ..."
|
|
44
|
+
const PRE_CHECKED_AC_RE = /^[-*]\s+\[x\]/im;
|
|
45
|
+
// Matches the nimai-spec marker (with or without date)
|
|
46
|
+
const NIMAI_MARKER_RE = /<!--\s*nimai-spec[\s:]/;
|
|
43
47
|
// Required top-level sections (by heading text, case-insensitive)
|
|
44
48
|
const REQUIRED_SECTIONS = [
|
|
45
49
|
'pre-flight',
|
|
@@ -129,12 +133,27 @@ function lintContent(content) {
|
|
|
129
133
|
issues.push(issue(lineNum, 'needs_human_input', `Unresolved [NEEDS HUMAN INPUT] flag on line ${lineNum}`));
|
|
130
134
|
}
|
|
131
135
|
}
|
|
136
|
+
// Pre-checked acceptance criteria — hard fail: ACs must be unchecked in a draft spec
|
|
137
|
+
if (PRE_CHECKED_AC_RE.test(content)) {
|
|
138
|
+
const matchLines = lines.reduce((acc, l, i) => {
|
|
139
|
+
if (/^[-*]\s+\[x\]/i.test(l))
|
|
140
|
+
acc.push(i + 1);
|
|
141
|
+
return acc;
|
|
142
|
+
}, []);
|
|
143
|
+
for (const lineNum of matchLines) {
|
|
144
|
+
issues.push(issue(lineNum, 'pre_checked_ac', `Pre-checked list item on line ${lineNum} — acceptance criteria must be unchecked ([ ]) in a draft spec`));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
132
147
|
const lower = content.toLowerCase();
|
|
133
148
|
for (const section of REQUIRED_SECTIONS) {
|
|
134
149
|
if (!lower.includes(section)) {
|
|
135
150
|
issues.push(issue(0, 'missing_section', `Required section missing: "${section}"`));
|
|
136
151
|
}
|
|
137
152
|
}
|
|
153
|
+
// Missing nimai-spec marker — advisory: spec was not created or registered by nimai
|
|
154
|
+
if (!NIMAI_MARKER_RE.test(content)) {
|
|
155
|
+
issues.push(advisoryIssue(0, 'missing_marker', 'No <!-- nimai-spec --> marker found — add it so nimai can discover this spec automatically (nimai new stamps it)'));
|
|
156
|
+
}
|
|
138
157
|
const riskTier = detectRiskTier(content);
|
|
139
158
|
const coding = isCodingSpec(content);
|
|
140
159
|
for (const rule of ADVISORY_RULES) {
|
package/dist/lint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":";;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C,KAAK,EAAE,CAAC;YACX,MAAM,cAAc,GAClB,IAAI,CAAC,aAAa,KAAK,SAAS;gBAChC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACrC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,CAAC;YAE/B,IAAI,cAAc,EAAE,CAAC;gBACnB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,kBAAkB,QAAQ,QAAQ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;YAC/H,CAAC;iBAAM,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC1D,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,KAAK,CAAC,IAAY,EAAE,IAAmB,EAAE,OAAe;IAC/D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACjC,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,IAAmB,EAAE,OAAe;IACvE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACjD,CAAC"}
|
package/dist/prompts.d.ts
CHANGED
|
@@ -16,9 +16,10 @@ export declare function buildPrompt1(request: string, contextSummary: string): s
|
|
|
16
16
|
* The reviewing LLM MUST end its response with a machine-parseable JSON verdict block:
|
|
17
17
|
* ## Verdict
|
|
18
18
|
* ```json
|
|
19
|
-
* {"passed": true, "issues": []}
|
|
19
|
+
* {"passed": true, "schema_version": "2", "issues": []}
|
|
20
20
|
* ```
|
|
21
|
-
*
|
|
21
|
+
* Schema version 2: issues are objects with dimension, severity, and detail fields.
|
|
22
|
+
* The host agent parses this block (last fenced JSON block) to drive the spec-review loop.
|
|
22
23
|
*/
|
|
23
24
|
export declare function buildPrompt15(specContent: string): string;
|
|
24
25
|
/**
|
package/dist/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CA0B5E;AAED
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CA0B5E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAmEzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAgBxD"}
|
package/dist/prompts.js
CHANGED
|
@@ -47,9 +47,10 @@ Loose request: ${request}`;
|
|
|
47
47
|
* The reviewing LLM MUST end its response with a machine-parseable JSON verdict block:
|
|
48
48
|
* ## Verdict
|
|
49
49
|
* ```json
|
|
50
|
-
* {"passed": true, "issues": []}
|
|
50
|
+
* {"passed": true, "schema_version": "2", "issues": []}
|
|
51
51
|
* ```
|
|
52
|
-
*
|
|
52
|
+
* Schema version 2: issues are objects with dimension, severity, and detail fields.
|
|
53
|
+
* The host agent parses this block (last fenced JSON block) to drive the spec-review loop.
|
|
53
54
|
*/
|
|
54
55
|
function buildPrompt15(specContent) {
|
|
55
56
|
return `You are a Specification Quality Reviewer operating under the FORGE framework.
|
|
@@ -59,30 +60,58 @@ Do NOT assess any code, code diffs, or implementation output.
|
|
|
59
60
|
|
|
60
61
|
## What to check
|
|
61
62
|
|
|
62
|
-
Evaluate each dimension
|
|
63
|
+
Evaluate each dimension. For each one, cite the specific line, section, or text that supports your verdict.
|
|
64
|
+
A verdict without citation is treated as NO_GO — do not assert PASS without evidence.
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
**Dimensions:**
|
|
67
|
+
|
|
68
|
+
1. **Binary acceptance criteria** — are all sub-task ACs measurable and unambiguous? Are any ACs pre-checked (- [x]) in the draft, which is always invalid?
|
|
69
|
+
2. **Scope coherence** — are in-scope and out-of-scope boundaries clearly stated and non-contradictory? Check for conflicts between conceptual terminology (e.g., state names, entity names used in descriptions) and persisted/modelled representations (e.g., enums, schemas, data shapes). Any mismatch is a HARD_FAIL.
|
|
66
70
|
3. **Constraint sufficiency** — do Must / Must-Not / Prefer / Escalate constraints cover the key risks?
|
|
67
|
-
4. **Decomposition realism** — can each sub-task be completed within the stated 2-hour limit by a skilled agent?
|
|
71
|
+
4. **Decomposition realism** — can each sub-task be completed within the stated 2-hour limit by a skilled agent? Check that sub-task dependencies are stated explicitly (if task B requires task A's output, that must be documented).
|
|
68
72
|
5. **Start-without-clarification viability** — can an agent begin immediately with the context provided, without asking the human for more information?
|
|
73
|
+
6. **Internal consistency** — are terms, names, and concepts used consistently throughout the spec? Flag any case where the same entity is described differently in different sections (e.g., "webhook event" in scope, "push notification" in ACs — are these the same thing?).
|
|
74
|
+
|
|
75
|
+
## Severity classification
|
|
76
|
+
|
|
77
|
+
For each issue, assign a severity:
|
|
78
|
+
- **HARD_FAIL** — must be fixed before any agent attempts implementation; blocks build
|
|
79
|
+
- **SOFT_FAIL** — significant gap, should be fixed but builder may proceed with explicit override
|
|
80
|
+
- **NOTE** — advisory observation; does not block
|
|
81
|
+
|
|
82
|
+
A spec passes (passed: true) only if it has zero HARD_FAIL issues.
|
|
69
83
|
|
|
70
84
|
## Output format
|
|
71
85
|
|
|
72
|
-
For each
|
|
86
|
+
For each dimension, write:
|
|
87
|
+
**[PASS|FAIL] Dimension name** — one-sentence rationale. *Evidence: cite the specific section/line/text.*
|
|
73
88
|
|
|
74
|
-
Then write a consolidated
|
|
89
|
+
Then write a consolidated remediation list for all FAIL dimensions.
|
|
75
90
|
|
|
76
91
|
Note: implementation correctness is explicitly out of scope for this review.
|
|
77
92
|
|
|
78
93
|
## Important
|
|
79
94
|
|
|
80
95
|
Always end your response with the following verdict block as the **final section**, regardless of pass/fail outcome.
|
|
81
|
-
The host agent parses
|
|
96
|
+
The host agent parses the **last fenced JSON block** in your response — if it is absent or malformed, the host treats the result as a hard failure and escalates to the human.
|
|
97
|
+
|
|
98
|
+
The verdict block format (schema version 2):
|
|
82
99
|
|
|
83
100
|
## Verdict
|
|
84
101
|
\`\`\`json
|
|
85
|
-
{
|
|
102
|
+
{
|
|
103
|
+
"passed": false,
|
|
104
|
+
"schema_version": "2",
|
|
105
|
+
"issues": [
|
|
106
|
+
{"dimension": "scope_coherence", "severity": "HARD_FAIL", "detail": "Conceptual state 'active' not mapped to persisted enum value"},
|
|
107
|
+
{"dimension": "decomposition_realism", "severity": "NOTE", "detail": "Sub-task 3 may exceed 2h limit if schema migration is complex"}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
\`\`\`
|
|
111
|
+
|
|
112
|
+
If the spec passes all dimensions with no HARD_FAIL issues, use:
|
|
113
|
+
\`\`\`json
|
|
114
|
+
{"passed": true, "schema_version": "2", "issues": []}
|
|
86
115
|
\`\`\`
|
|
87
116
|
|
|
88
117
|
---
|
package/dist/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAMH,oCA0BC;
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAMH,oCA0BC;AAeD,sCAmEC;AAMD,oCAgBC;AAtID;;;GAGG;AACH,SAAgB,YAAY,CAAC,OAAe,EAAE,cAAsB;IAClE,OAAO;;;;;;;;;;;;;;;;;;;;;EAqBP,cAAc,IAAI,6BAA6B;;;iBAGhC,OAAO,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,aAAa,CAAC,WAAmB;IAC/C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEP,WAAW,EAAE,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAAC,WAAmB;IAC9C,OAAO;;;;;;;;;;;;;;EAcP,WAAW,EAAE,CAAC;AAChB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type LintIssueType = 'blank_field' | 'needs_human_input' | 'missing_section' | 'missing_module_boundary' | 'missing_interface_contract' | 'missing_non_goals' | 'missing_change_surface' | 'missing_dependency_direction';
|
|
1
|
+
export type LintIssueType = 'blank_field' | 'needs_human_input' | 'missing_section' | 'missing_module_boundary' | 'missing_interface_contract' | 'missing_non_goals' | 'missing_change_surface' | 'missing_dependency_direction' | 'pre_checked_ac' | 'missing_marker';
|
|
2
2
|
export interface LintIssue {
|
|
3
3
|
line: number;
|
|
4
4
|
type: LintIssueType;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,mBAAmB,GACnB,iBAAiB,GACjB,yBAAyB,GACzB,4BAA4B,GAC5B,mBAAmB,GACnB,wBAAwB,GACxB,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,mBAAmB,GACnB,iBAAiB,GACjB,yBAAyB,GACzB,4BAA4B,GAC5B,mBAAmB,GACnB,wBAAwB,GACxB,8BAA8B,GAC9B,gBAAgB,GAChB,gBAAgB,CAAC;AAErB,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verdict-block parser for FORGE Prompt 1.5 responses.
|
|
3
|
+
*
|
|
4
|
+
* The reviewing LLM must end its response with a fenced JSON block:
|
|
5
|
+
* ```json
|
|
6
|
+
* {"passed": true, "issues": []}
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* This module parses that block and normalises the result.
|
|
10
|
+
* Malformed or absent blocks return { passed: false } to ensure the loop
|
|
11
|
+
* escalates rather than silently treating ambiguous output as a pass.
|
|
12
|
+
*
|
|
13
|
+
* Schema versions:
|
|
14
|
+
* v1: issues is string[]
|
|
15
|
+
* v2: issues is VerdictIssue[] with dimension/severity/detail fields
|
|
16
|
+
* Both are accepted; v1 strings are wrapped as VerdictIssue with detail only.
|
|
17
|
+
*/
|
|
18
|
+
export interface VerdictIssue {
|
|
19
|
+
/** Which review dimension this issue relates to (v2+) */
|
|
20
|
+
dimension?: string;
|
|
21
|
+
/** Severity classification (v2+) */
|
|
22
|
+
severity?: 'HARD_FAIL' | 'SOFT_FAIL' | 'NOTE';
|
|
23
|
+
/** Human-readable description of the issue */
|
|
24
|
+
detail: string;
|
|
25
|
+
}
|
|
26
|
+
export interface Verdict {
|
|
27
|
+
passed: boolean;
|
|
28
|
+
issues: VerdictIssue[];
|
|
29
|
+
/** Present when schema_version "2" block was parsed */
|
|
30
|
+
schema_version?: string;
|
|
31
|
+
}
|
|
32
|
+
/** Sentinel returned when the block is absent or malformed */
|
|
33
|
+
export declare const MALFORMED_VERDICT: Verdict;
|
|
34
|
+
/**
|
|
35
|
+
* Parse the last fenced JSON block from an LLM response.
|
|
36
|
+
* Returns a normalised Verdict, or MALFORMED_VERDICT on any parse error.
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseVerdict(llmResponse: string): Verdict;
|
|
39
|
+
//# sourceMappingURL=verdict.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../src/verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,MAAM,CAAC;IAC9C,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,EAAE,OAA4G,CAAC;AAE7I;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAqCzD"}
|
package/dist/verdict.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Verdict-block parser for FORGE Prompt 1.5 responses.
|
|
4
|
+
*
|
|
5
|
+
* The reviewing LLM must end its response with a fenced JSON block:
|
|
6
|
+
* ```json
|
|
7
|
+
* {"passed": true, "issues": []}
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* This module parses that block and normalises the result.
|
|
11
|
+
* Malformed or absent blocks return { passed: false } to ensure the loop
|
|
12
|
+
* escalates rather than silently treating ambiguous output as a pass.
|
|
13
|
+
*
|
|
14
|
+
* Schema versions:
|
|
15
|
+
* v1: issues is string[]
|
|
16
|
+
* v2: issues is VerdictIssue[] with dimension/severity/detail fields
|
|
17
|
+
* Both are accepted; v1 strings are wrapped as VerdictIssue with detail only.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.MALFORMED_VERDICT = void 0;
|
|
21
|
+
exports.parseVerdict = parseVerdict;
|
|
22
|
+
/** Sentinel returned when the block is absent or malformed */
|
|
23
|
+
exports.MALFORMED_VERDICT = { passed: false, issues: [{ detail: 'Verdict block absent or malformed — treating as failure' }] };
|
|
24
|
+
/**
|
|
25
|
+
* Parse the last fenced JSON block from an LLM response.
|
|
26
|
+
* Returns a normalised Verdict, or MALFORMED_VERDICT on any parse error.
|
|
27
|
+
*/
|
|
28
|
+
function parseVerdict(llmResponse) {
|
|
29
|
+
const lastBlock = extractLastJsonBlock(llmResponse);
|
|
30
|
+
if (!lastBlock)
|
|
31
|
+
return exports.MALFORMED_VERDICT;
|
|
32
|
+
let raw;
|
|
33
|
+
try {
|
|
34
|
+
raw = JSON.parse(lastBlock);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return exports.MALFORMED_VERDICT;
|
|
38
|
+
}
|
|
39
|
+
if (!isPlainObject(raw))
|
|
40
|
+
return exports.MALFORMED_VERDICT;
|
|
41
|
+
if (typeof raw.passed !== 'boolean')
|
|
42
|
+
return exports.MALFORMED_VERDICT;
|
|
43
|
+
if (!Array.isArray(raw.issues))
|
|
44
|
+
return exports.MALFORMED_VERDICT;
|
|
45
|
+
const issues = [];
|
|
46
|
+
for (const item of raw.issues) {
|
|
47
|
+
if (typeof item === 'string') {
|
|
48
|
+
// v1 format: plain string
|
|
49
|
+
issues.push({ detail: item });
|
|
50
|
+
}
|
|
51
|
+
else if (isPlainObject(item) && typeof item.detail === 'string') {
|
|
52
|
+
// v2 format: object with at least detail field
|
|
53
|
+
const vi = { detail: item.detail };
|
|
54
|
+
if (typeof item.dimension === 'string')
|
|
55
|
+
vi.dimension = item.dimension;
|
|
56
|
+
if (item.severity === 'HARD_FAIL' || item.severity === 'SOFT_FAIL' || item.severity === 'NOTE') {
|
|
57
|
+
vi.severity = item.severity;
|
|
58
|
+
}
|
|
59
|
+
issues.push(vi);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
// Unexpected item shape — treat whole verdict as malformed
|
|
63
|
+
return exports.MALFORMED_VERDICT;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const verdict = { passed: raw.passed, issues };
|
|
67
|
+
if (typeof raw.schema_version === 'string')
|
|
68
|
+
verdict.schema_version = raw.schema_version;
|
|
69
|
+
return verdict;
|
|
70
|
+
}
|
|
71
|
+
/** Extract the text of the last ```json ... ``` fenced block in the response */
|
|
72
|
+
function extractLastJsonBlock(text) {
|
|
73
|
+
// Match all ```json ... ``` fenced blocks (non-greedy)
|
|
74
|
+
const re = /```json\s*([\s\S]*?)```/g;
|
|
75
|
+
let last = null;
|
|
76
|
+
let match;
|
|
77
|
+
while ((match = re.exec(text)) !== null) {
|
|
78
|
+
last = match[1].trim();
|
|
79
|
+
}
|
|
80
|
+
return last;
|
|
81
|
+
}
|
|
82
|
+
function isPlainObject(v) {
|
|
83
|
+
return typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=verdict.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict.js","sourceRoot":"","sources":["../src/verdict.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAyBH,oCAqCC;AA5CD,8DAA8D;AACjD,QAAA,iBAAiB,GAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,yDAAyD,EAAE,CAAC,EAAE,CAAC;AAE7I;;;GAGG;AACH,SAAgB,YAAY,CAAC,WAAmB;IAC9C,MAAM,SAAS,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IACpD,IAAI,CAAC,SAAS;QAAE,OAAO,yBAAiB,CAAC;IAEzC,IAAI,GAAY,CAAC;IACjB,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,yBAAiB,CAAC;IAC3B,CAAC;IAED,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;QAAE,OAAO,yBAAiB,CAAC;IAClD,IAAI,OAAO,GAAG,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,yBAAiB,CAAC;IAC9D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,yBAAiB,CAAC;IAEzD,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAC9B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,0BAA0B;YAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAChC,CAAC;aAAM,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,C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I,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nimai-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Nimai core library — template loading, lint engine, context extraction. No LLM dependencies.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"nimai",
|
|
7
|
-
"forge",
|
|
8
|
-
"spec",
|
|
9
|
-
"lint",
|
|
10
|
-
"ai",
|
|
11
|
-
"llm",
|
|
12
|
-
"specification",
|
|
13
|
-
"template"
|
|
14
|
-
],
|
|
5
|
+
"keywords": ["nimai", "forge", "spec", "lint", "ai", "llm", "specification", "template"],
|
|
15
6
|
"license": "MIT",
|
|
16
7
|
"repository": {
|
|
17
8
|
"type": "git",
|
|
18
9
|
"url": "https://github.com/Balagopalaji/nimai.git",
|
|
19
10
|
"directory": "packages/core"
|
|
20
11
|
},
|
|
21
|
-
"files": [
|
|
22
|
-
"dist/"
|
|
23
|
-
],
|
|
12
|
+
"files": ["dist/"],
|
|
24
13
|
"main": "dist/index.js",
|
|
25
14
|
"types": "dist/index.d.ts",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"dev": "tsc --watch",
|
|
19
|
+
"clean": "rm -rf dist"
|
|
20
|
+
},
|
|
26
21
|
"devDependencies": {
|
|
27
22
|
"@types/node": "^22.0.0",
|
|
28
23
|
"typescript": "^5.4.5",
|
|
@@ -30,11 +25,5 @@
|
|
|
30
25
|
},
|
|
31
26
|
"dependencies": {
|
|
32
27
|
"zod": "^3.23.8"
|
|
33
|
-
},
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "tsc",
|
|
36
|
-
"test": "vitest run",
|
|
37
|
-
"dev": "tsc --watch",
|
|
38
|
-
"clean": "rm -rf dist"
|
|
39
28
|
}
|
|
40
|
-
}
|
|
29
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Balagopalaji
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|