nimai-mcp 0.3.7 → 0.3.9

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.
@@ -212,17 +212,23 @@ You are a Specification Quality Reviewer operating under the FORGE framework.
212
212
  Your job is to evaluate the draft spec below for spec quality only — not implementation correctness.
213
213
  Do NOT assess any code, code diffs, or implementation output.
214
214
 
215
- Evaluate each dimension with a binary PASS or FAIL:
216
- 1. Binary acceptance criteria are all sub-task ACs measurable and unambiguous?
217
- 2. Scope coherence — are in-scope/out-of-scope boundaries clear and non-contradictory?
218
- 3. Constraint sufficiencydo Must/Must-Not/Prefer/Escalate constraints cover key risks?
219
- 4. Decomposition realismcan each sub-task be done within 2 hours by a skilled agent?
220
- 5. Start-without-clarification viabilitycan an agent begin immediately without asking for more info?
221
-
222
- Always end your response with a JSON verdict block:
215
+ Evaluate each dimension. Cite evidence for every verdict — a verdict without citation is treated as NO_GO.
216
+ Classify each issue as HARD_FAIL, SOFT_FAIL, or NOTE. passed: true requires zero HARD_FAILs.
217
+
218
+ 1. Binary acceptance criteria are all sub-task ACs measurable and unambiguous? Pre-checked [x] ACs are always invalid.
219
+ 2. Scope coherenceare in-scope/out-of-scope boundaries clear and non-contradictory? Terminology mismatches between conceptual and persisted representations are a HARD_FAIL.
220
+ 3. Constraint sufficiencydo Must/Must-Not/Prefer/Escalate constraints cover the key risks?
221
+ 4. Decomposition realism — can each sub-task be done within 2 hours? Sub-task dependencies must be explicit.
222
+ 5. Start-without-clarification viability can an agent begin immediately with the context provided?
223
+ 6. Internal consistency — are terms, names, and concepts used consistently throughout?
224
+ 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
+ 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
+ 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.
227
+
228
+ Always end your response with:
223
229
  ## Verdict
224
230
  ```json
225
- {"passed": <true|false>, "issues": ["<issue>", ...]}
231
+ {"passed": <true|false>, "schema_version": "2", "issues": [{"dimension": "<name>", "severity": "<HARD_FAIL|SOFT_FAIL|NOTE>", "detail": "<cited evidence>"}]}
226
232
  ```
227
233
 
228
234
  Draft spec: [PASTE DRAFT SPEC HERE]
@@ -306,6 +312,7 @@ PASS → done | FAIL → revise or escalate
306
312
  - [ ] Spec red-teamed against Failure Mode Taxonomy
307
313
  - [ ] Planner execution plan will be saved as artifact
308
314
  - [ ] Living Specification log set up (multi-session)
315
+ - [ ] Spec Convergence section filled — `open_questions: 0`, `ambiguities_remaining: 0`, `ready_for_build: yes`
309
316
 
310
317
  ---
311
318
 
@@ -91,6 +91,26 @@ The project is complete when ALL of the following are true:
91
91
 
92
92
  ---
93
93
 
94
+ ## 1.5 Mechanism Decision
95
+ *One block per core architectural or algorithmic choice. If no core mechanism applies, write "N/A" and justify.*
96
+ *A builder must be able to start coding without choosing missing architecture. If any mechanism is undecided, resolve it here first.*
97
+
98
+ ---
99
+
100
+ **Decision: [short name, e.g., "Primary parsing method"]**
101
+
102
+ ```
103
+ Chosen approach: _______________________________________________
104
+
105
+ Rejected alternatives: _________________________________________
106
+
107
+ Why rejected: __________________________________________________
108
+
109
+ Impact on ACs: _________________________________________________
110
+ ```
111
+
112
+ ---
113
+
94
114
  ## 2. Intent Layer — The Compass
95
115
 
96
116
  ### 2.1 Agent Deployment Purpose
@@ -372,6 +392,37 @@ Acceptance criteria: _____________________________________
372
392
 
373
393
  ---
374
394
 
395
+ ## 8.5 Edge Cases and Failure Modes
396
+ > Required for medium/high risk specs. Red-team the spec before builder handoff.
397
+ > For each scenario, document what the spec says the builder must do. A blank list is a hard stop.
398
+
399
+ **FORGE failure mode coverage:**
400
+ - Scope Creep — which Must-Not explicitly prevents it: `_______________`
401
+ - Hallucinated Completion — which AC is hardest to fake: `_______________`
402
+ - Intent Drift — which decision will the builder most likely get wrong: `_______________`
403
+ - Context Collapse — what context is load-bearing and must not be dropped: `_______________`
404
+ - Runaway Cost — what resource cap prevents unbounded execution: `_______________`
405
+ - Overconfident Output — what requires uncertainty reporting: `_______________`
406
+
407
+ **Domain-specific edge cases:**
408
+ - `_______________`
409
+ - `_______________`
410
+
411
+ ---
412
+
413
+ ## 9. Spec Convergence
414
+ > Fill before handing to a builder. A non-zero count or "no" is a hard stop.
415
+ > Every [NEEDS HUMAN INPUT] flag from spec drafting must be resolved before this section is filled.
416
+
417
+ ```
418
+ open_questions: 0
419
+ ambiguities_remaining: 0
420
+ ready_for_build: yes
421
+ convergence_notes: _______________________________________________
422
+ ```
423
+
424
+ ---
425
+
375
426
  *FORGE Spec Template v1.0 — companion to the FORGE system. A blank field is an unresolved decision.*
376
427
  *System docs: Quick Reference · Canonical Framework · Spec Template (this doc)*
377
428
 
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzD,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;EAE7B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;EAExB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAIH,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB;;;;OAIG;IACH,cAAc,EAAE,MA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ACzB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,oDAAoD;IACpD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAID,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDnB,CAAC"}
package/dist/contract.js CHANGED
@@ -42,7 +42,9 @@ exports.TOOL_DESCRIPTORS = {
42
42
  'Also returns existing_specs: paths of nimai-managed spec files already in the repo. ' +
43
43
  'If existing_specs is empty, call nimai_new first to scaffold a spec file, 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, then nimai_spec_review. ' +
46
+ 'Scope boundary: this tool produces spec prompts/contracts only. ' +
47
+ 'It does not orchestrate runtime execution, retries, agent routing, or session control.',
46
48
  inputSchema: exports.ForgeSpecInput,
47
49
  },
48
50
  nimai_review: {
@@ -74,7 +76,9 @@ exports.TOOL_DESCRIPTORS = {
74
76
  'The user will take the specReviewerPrompt to an independent reviewer (fresh session, different model). ' +
75
77
  'Wait for the user to return the verdict block: {"passed": true/false, "schema_version": "2", "issues": [...]}. ' +
76
78
  'If passed=false, fix the spec using the issues list, re-run nimai_validate, then call this again. ' +
77
- 'For reviewing an implementation against an approved spec, use nimai_review instead.',
79
+ 'For reviewing an implementation against an approved spec, use nimai_review instead. ' +
80
+ 'Scope boundary: this tool governs spec quality review contracts only. ' +
81
+ 'It does not execute implementation workflows or runtime orchestration.',
78
82
  inputSchema: exports.ForgeSpecReviewInput,
79
83
  },
80
84
  };
@@ -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,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8CAA8C,CAAC;CACpF,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;CACzE,CAAC,CAAC;AAEU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;CACxE,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gDAAgD,CAAC;CACzF,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;CAClF,CAAC,CAAC;AAsDH,iFAAiF;AAEpE,QAAA,gBAAgB,GAA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DAA6D;YAC7D,uGAAuG;YACvG,4FAA4F;YAC5F,yGAAyG;YACzG,iHAAiH;YACjH,oGAAoG;YACpG,sFAAsF;YACtF,wEAAwE;YACxE,wEAAwE;QAC1E,WAAW,EAAE,4BAAoB;KAClC;CACO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nimai-mcp",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Nimai MCP server — exposes nimai_spec, nimai_review, nimai_validate, nimai_new as tools. No internal LLM calls.",
5
5
  "keywords": [
6
6
  "nimai",
@@ -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.7"
39
+ "nimai-core": "0.3.9"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsc",