nimai-mcp 0.3.10 → 0.4.1

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.
@@ -193,7 +193,8 @@ Generate:
193
193
  7. Risk tier (Low / Medium / High with reasoning)
194
194
  8. Cognitive mode per sub-task
195
195
  9. Context needed (what the executing agent requires)
196
- 10. Proposed validator prompt (what a reviewer should check)
196
+ 10. Architecture Lock details for medium/high coding specs (Persistence layer, File/object storage, External model/service + env var, API trigger flow, Entity status state machine, Auth implementation)
197
+ 11. Proposed validator prompt (what a reviewer should check)
197
198
 
198
199
  Loose request: [PASTE YOUR REQUEST HERE]
199
200
  ```
@@ -207,6 +208,7 @@ doesn't match your intent. Approved spec = your deployment brief.
207
208
  *Run this on a draft spec before approving it. The reviewing LLM checks whether the spec is agent-ready.*
208
209
 
209
210
  ```
211
+ You are the independent reviewer for this draft spec. Evaluate it now.
210
212
  You are a Specification Quality Reviewer operating under the FORGE framework.
211
213
 
212
214
  Your job is to evaluate the draft spec below for spec quality only — not implementation correctness.
@@ -224,6 +226,7 @@ Classify each issue as HARD_FAIL, SOFT_FAIL, or NOTE. passed: true requires zero
224
226
  7. Mechanism lock — does every core flow commit to exactly ONE implementation path? Any "e.g./or/could/might/such as" in Deliverable, Scope, Constraints, or Tasks is a HARD_FAIL.
225
227
  8. Convergence declaration — does the spec include a Spec Convergence section with open_questions: 0 and ambiguities_remaining: 0? Absent, non-zero, or ready_for_build: no is a HARD_FAIL.
226
228
  9. Adversarial gap scan — does the spec include a substantively filled Edge Cases and Failure Modes section? Steelman as a builder following it exactly: what failure modes are unaddressed? Absent or placeholder-only is a HARD_FAIL for medium/high risk specs.
229
+ 10. Architecture completeness — for medium/high coding specs, does the spec include `## 1.6 Architecture Lock` with resolved fields for Persistence layer, File/object storage, External model/service + env var, API trigger flow, Entity status state machine, and Auth implementation? Missing, blank, `___`, or `TBD` is a HARD_FAIL.
227
230
 
228
231
  Always end your response with:
229
232
  ## Verdict
@@ -241,6 +244,8 @@ The host agent parses the `## Verdict` JSON block to drive the review loop:
241
244
 
242
245
  Use `nimai_spec_review` to generate this prompt automatically from a spec file.
243
246
 
247
+ When Prompt 1.5 fails, the reviewer should append a `## Builder Brief` section after the verdict with one actionable fix per issue (section to edit + concrete fix direction).
248
+
244
249
  ---
245
250
 
246
251
  ### Prompt 2 — Reviewer / Validator Prompt Generator
@@ -292,6 +297,7 @@ PASS → done | FAIL → revise or escalate
292
297
  **Specification**
293
298
  - [ ] Deliverable precise; scope boundaries explicit
294
299
  - [ ] Sub-tasks satisfy all 5 Primitives
300
+ - [ ] For medium/high coding specs, `## 1.6 Architecture Lock` is present and fully resolved (no blank/`___`/`TBD` fields)
295
301
 
296
302
  **Intent**
297
303
  - [ ] Each agent has explicit deployment purpose
@@ -111,6 +111,26 @@ Impact on ACs: _________________________________________________
111
111
 
112
112
  ---
113
113
 
114
+ ## 1.6 Architecture Lock
115
+ *Required for medium/high coding specs. Advisory for low/unknown/non-coding specs.*
116
+ *All fields must be resolved before builder handoff. Blank placeholders and "TBD" are unresolved.*
117
+
118
+ ```
119
+ Persistence layer: _______________________________________________
120
+
121
+ File/object storage: _____________________________________________
122
+
123
+ External model/service + env var: ________________________________
124
+
125
+ API trigger flow: ________________________________________________
126
+
127
+ Entity status state machine: _____________________________________
128
+
129
+ Auth implementation: _____________________________________________
130
+ ```
131
+
132
+ ---
133
+
114
134
  ## 2. Intent Layer — The Compass
115
135
 
116
136
  ### 2.1 Agent Deployment Purpose
@@ -59,7 +59,8 @@ export interface ForgeSpecOutput {
59
59
  context: ContextItem[];
60
60
  /**
61
61
  * Existing nimai-managed spec files found in the repo (sorted newest-first).
62
- * Empty array means no spec file exists yet — call nimai_new before filling the spec.
62
+ * Empty array means no spec file exists yet — MUST call nimai_new immediately as the next action.
63
+ * Do not ask follow-up questions or narrate alternatives before calling nimai_new.
63
64
  * Non-empty means spec files already exist — you may fill one of these instead of creating a new one.
64
65
  */
65
66
  existing_specs: string[];
@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 -40,10 +40,12 @@ exports.TOOL_DESCRIPTORS = {
40
40
  description: 'Returns a populated FORGE Self-Spec Agent prompt (Prompt 1) plus extracted repo context. ' +
41
41
  'The host model uses this bundle to fill a draft spec — no LLM call is made inside this tool. ' +
42
42
  'Also returns existing_specs: paths of nimai-managed spec files already in the repo. ' +
43
- 'If existing_specs is empty, call nimai_new first to scaffold a spec file, then fill it using the returned prompt. ' +
43
+ 'If existing_specs is empty, you MUST call nimai_new immediately as the next action (no asking, no narration), then fill it using the returned prompt. ' +
44
44
  'If existing_specs is non-empty, fill one of those files instead. ' +
45
- 'After filling: call nimai_validate, then nimai_spec_review. ' +
45
+ 'After filling: call nimai_validate. ' +
46
+ 'After nimai_validate passes, tell the user to open a fresh reviewer session and ask it to call nimai_spec_review. The builder must not perform the review in the same session. ' +
46
47
  'Scope boundary: this tool produces spec prompts/contracts only. ' +
48
+ 'Nimai defines and enforces spec-quality contracts; ChatMasala executes agent workflows against those contracts; context platforms provide the execution substrate. ' +
47
49
  'It does not orchestrate runtime execution, retries, agent routing, or session control.',
48
50
  inputSchema: exports.ForgeSpecInput,
49
51
  },
@@ -58,7 +60,10 @@ exports.TOOL_DESCRIPTORS = {
58
60
  name: 'nimai_validate',
59
61
  description: 'Lints a spec file for unresolved placeholder fields (___), [NEEDS HUMAN INPUT] flags, ' +
60
62
  'missing required sections, and pre-checked acceptance criteria. Returns structured issues and a pass/fail result. ' +
61
- 'Run this after filling a spec and again after every fix before calling nimai_spec_review.',
63
+ 'Run this after filling a spec and again after every fix. ' +
64
+ 'If passed: true, tell the user the spec is structurally complete and ready for independent review. ' +
65
+ 'Instruct them to open a fresh reviewer session (no prior builder context) and ask it to call nimai_spec_review({ specPath: \'[path]\' }). ' +
66
+ 'The builder must not perform the review in the same session.',
62
67
  inputSchema: exports.ForgeValidateInput,
63
68
  },
64
69
  nimai_new: {
@@ -68,16 +73,16 @@ exports.TOOL_DESCRIPTORS = {
68
73
  },
69
74
  nimai_spec_review: {
70
75
  name: 'nimai_spec_review',
71
- description: 'USE THIS BEFORE BUILDING: returns a Prompt 1.5 spec-quality reviewer prompt plus reviewer_instructions. ' +
72
- 'Only call this after nimai_validate passes. ' +
73
- 'CRITICAL: do NOT evaluate the specReviewerPrompt yourself. ' +
74
- 'The agent that built the spec must not be its own reviewer — this defeats the purpose of the review. ' +
75
- 'After calling this tool, present the reviewer_instructions to the user verbatim and stop. ' +
76
- 'The user will take the specReviewerPrompt to an independent reviewer (fresh session, different model). ' +
77
- 'Wait for the user to return the verdict block: {"passed": true/false, "schema_version": "2", "issues": [...]}. ' +
78
- 'If passed=false, fix the spec using the issues list, re-run nimai_validate, then call this again. ' +
76
+ description: 'Primary owner: independent reviewer in a fresh session. ' +
77
+ 'Returns Prompt 1.5 spec-quality review checklist for the spec at specPath. ' +
78
+ 'The reviewer evaluates the spec and outputs a verdict. ' +
79
+ 'If passed: false, reviewer must output a Builder Brief ' +
80
+ '(header: \'## Paste this to your builder session:\') with one fix instruction per HARD_FAIL/SOFT_FAIL issue. ' +
81
+ 'The builder must not perform the review in the same session it wrote the spec ' +
82
+ 'independent review requires a fresh session with no builder context. ' +
79
83
  'For reviewing an implementation against an approved spec, use nimai_review instead. ' +
80
84
  'Scope boundary: this tool governs spec quality review contracts only. ' +
85
+ 'Nimai defines and enforces spec-quality contracts; ChatMasala executes agent workflows against those contracts; context platforms provide the execution substrate. ' +
81
86
  'It does not execute implementation workflows or runtime orchestration.',
82
87
  inputSchema: exports.ForgeSpecReviewInput,
83
88
  },
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,6BAAwB;AAGxB,iFAAiF;AAEpE,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACrE,OAAO,EAAE,OAAC,CAAC,MAAM,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AAM,KAAK,CAAC;AAExB,wBAAsB,cAAc,CAClC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GAC1C,OAAO,CAAC,qBAAqB,CAAC,CAqDhC"}
1
+ {"version":3,"file":"spec-review.d.ts","sourceRoot":"","sources":["../../src/tools/spec-review.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAsB,cAAc,CAClC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GAC1C,OAAO,CAAC,qBAAqB,CAAC,CAqBhC"}
@@ -47,44 +47,11 @@ async function toolSpecReview(input) {
47
47
  throw new Error(`Cannot read spec at "${specPath}": ${err.message}`);
48
48
  }
49
49
  const specReviewerPrompt = (0, nimai_core_1.buildPrompt15)(specContent);
50
- const reviewer_instructions = [
51
- '⚠️ INDEPENDENT REVIEW REQUIRED',
52
- '',
53
- 'The spec-quality review must be done by an independent reviewer —',
54
- 'NOT the agent that created or edited the spec.',
55
- '',
56
- '── STEP 1: Send to independent reviewer ──────────────────────────',
57
- '1. Copy the specReviewerPrompt string from this response.',
58
- '2. Open a FRESH SESSION with a different model or agent',
59
- ' (e.g. paste into Claude, a new Codex thread, or any LLM).',
60
- '3. Paste the prompt and let the reviewer evaluate the spec.',
61
- '4. The reviewer will end their response with a JSON verdict block:',
62
- ' {"passed": true/false, "schema_version": "2", "issues": [...]}',
63
- '',
64
- '── STEP 2: Return the verdict ────────────────────────────────────',
65
- 'Bring the full verdict back to THIS session.',
66
- '',
67
- ' If passed: true',
68
- ' → The spec is approved. Proceed to implementation.',
69
- '',
70
- ' If passed: false',
71
- ' → Do NOT re-run nimai_spec (that would discard all spec work).',
72
- ` → Give the builder this message (fill in the verdict):`,
73
- '',
74
- ` ┌─ BUILDER FIX BRIEF ──────────────────────────────────────────`,
75
- ` │ The independent spec review found issues in: ${specPath}`,
76
- ` │`,
77
- ` │ Fix each HARD_FAIL and SOFT_FAIL in the verdict below by`,
78
- ` │ editing the spec directly. Do not regenerate from scratch.`,
79
- ` │`,
80
- ` │ [PASTE VERDICT HERE]`,
81
- ` │`,
82
- ` │ After fixing:`,
83
- ` │ 1. Run nimai_validate — must return passed: true`,
84
- ` │ 2. Run nimai_spec_review — get new reviewer_instructions`,
85
- ` │ 3. Send to an independent reviewer again (do not self-review)`,
86
- ` └──────────────────────────────────────────────────────────────`,
87
- ].join('\n');
50
+ const reviewer_instructions = `Open a fresh reviewer session with nimai-mcp configured.\n` +
51
+ `Ask it to call: nimai_spec_review({ specPath: '${specPath}' })\n` +
52
+ `then evaluate the returned prompt and return a verdict.\n\n` +
53
+ `If the reviewer session does not have nimai-mcp available,\n` +
54
+ `paste the following prompt directly:\n\n\`\`\`\n${specReviewerPrompt}\n\`\`\``;
88
55
  return { specReviewerPrompt, reviewer_instructions };
89
56
  }
90
57
  //# sourceMappingURL=spec-review.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-review.js","sourceRoot":"","sources":["../../src/tools/spec-review.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wCAuDC;AA7DD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA2C;AAIpC,KAAK,UAAU,cAAc,CAClC,KAA2C;IAE3C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,WAAmB,CAAC;IACxB,IAAI,CAAC;QACH,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,wBAAwB,QAAQ,MAAO,GAA6B,CAAC,OAAO,EAAE,CAC/E,CAAC;IACJ,CAAC;IAED,MAAM,kBA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,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,GAAG,IAAA,0BAAa,EAAC,WAAW,CAAC,CAAC;IAEtD,MAAM,qBAAqB,GACzB,4DAA4D;QAC5D,kDAAkD,QAAQ,QAAQ;QAClE,6DAA6D;QAC7D,8DAA8D;QAC9D,mDAAmD,kBAAkB,UAAU,CAAC;IAElF,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,CAAC;AACvD,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nimai-mcp",
3
- "version": "0.3.10",
4
- "description": "Nimai MCP server — exposes nimai_spec, nimai_review, nimai_validate, nimai_new as tools. No internal LLM calls.",
3
+ "version": "0.4.1",
4
+ "description": "Nimai MCP server — exposes nimai_spec, nimai_review, nimai_validate, nimai_new, nimai_spec_review as tools. No internal LLM calls.",
5
5
  "keywords": [
6
6
  "nimai",
7
7
  "forge",
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@modelcontextprotocol/sdk": "^1.0.0",
38
38
  "zod": "^3.23.8",
39
- "nimai-core": "0.3.10"
39
+ "nimai-core": "0.4.1"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsc",