nex-level-code 0.1.1 → 0.1.3

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/LICENSE ADDED
@@ -0,0 +1,133 @@
1
+ # PolyForm Noncommercial License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
4
+
5
+ Required Notice: Copyright FTay Consulting (https://github.com/ftay1026/nex-level-code)
6
+
7
+ ## Acceptance
8
+
9
+ In order to get any license under these terms, you must agree
10
+ to them as both strict obligations and conditions to all
11
+ your licenses.
12
+
13
+ ## Copyright License
14
+
15
+ The licensor grants you a copyright license for the
16
+ software to do everything you might do with the software
17
+ that would otherwise infringe the licensor's copyright
18
+ in it for any permitted purpose. However, you may
19
+ only distribute the software according to [Distribution
20
+ License](#distribution-license) and make changes or new works
21
+ based on the software according to [Changes and New Works
22
+ License](#changes-and-new-works-license).
23
+
24
+ ## Distribution License
25
+
26
+ The licensor grants you an additional copyright license
27
+ to distribute copies of the software. Your license
28
+ to distribute covers distributing the software with
29
+ changes and new works permitted by [Changes and New Works
30
+ License](#changes-and-new-works-license).
31
+
32
+ ## Notices
33
+
34
+ You must ensure that anyone who gets a copy of any part of
35
+ the software from you also gets a copy of these terms or the
36
+ URL for them above, as well as copies of any plain-text lines
37
+ beginning with `Required Notice:` that the licensor provided
38
+ with the software. For example:
39
+
40
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
41
+
42
+ ## Changes and New Works License
43
+
44
+ The licensor grants you an additional copyright license to
45
+ make changes and new works based on the software for any
46
+ permitted purpose.
47
+
48
+ ## Patent License
49
+
50
+ The licensor grants you a patent license for the software that
51
+ covers patent claims the licensor can license, or becomes able
52
+ to license, that you would infringe by using the software.
53
+
54
+ ## Noncommercial Purposes
55
+
56
+ Any noncommercial purpose is a permitted purpose.
57
+
58
+ ## Personal Uses
59
+
60
+ Personal use for research, experiment, and testing for
61
+ the benefit of public knowledge, personal study, private
62
+ entertainment, hobby projects, amateur pursuits, or religious
63
+ observance, without any anticipated commercial application,
64
+ is use for a permitted purpose.
65
+
66
+ ## Noncommercial Organizations
67
+
68
+ Use by any charitable organization, educational institution,
69
+ public research organization, public safety or health
70
+ organization, environmental protection organization,
71
+ or government institution is use for a permitted purpose
72
+ regardless of the source of funding or obligations resulting
73
+ from the funding.
74
+
75
+ ## Fair Use
76
+
77
+ You may have "fair use" rights for the software under the
78
+ law. These terms do not limit them.
79
+
80
+ ## No Other Rights
81
+
82
+ These terms do not allow you to sublicense or transfer any of
83
+ your licenses to anyone else, or prevent the licensor from
84
+ granting licenses to anyone else. These terms do not imply
85
+ any other licenses.
86
+
87
+ ## Patent Defense
88
+
89
+ If you make any written claim that the software infringes or
90
+ contributes to infringement of any patent, your patent license
91
+ for the software granted under these terms ends immediately. If
92
+ your company makes such a claim, your patent license ends
93
+ immediately for work on behalf of your company.
94
+
95
+ ## Violations
96
+
97
+ The first time you are notified in writing that you have
98
+ violated any of these terms, or done anything with the software
99
+ not covered by your licenses, your licenses can nonetheless
100
+ continue if you come into full compliance with these terms,
101
+ and take practical steps to correct past violations, within
102
+ 32 days of receiving notice. Otherwise, all your licenses
103
+ end immediately.
104
+
105
+ ## No Liability
106
+
107
+ ***As far as the law allows, the software comes as is, without
108
+ any warranty or condition, and the licensor will not be liable
109
+ to you for any damages arising out of these terms or the use
110
+ or nature of the software, under any kind of legal claim.***
111
+
112
+ ## Definitions
113
+
114
+ The **licensor** is the individual or entity offering these
115
+ terms, and the **software** is the software the licensor makes
116
+ available under these terms.
117
+
118
+ **You** refers to the individual or entity agreeing to these
119
+ terms.
120
+
121
+ **Your company** is any legal entity, sole proprietorship,
122
+ or other kind of organization that you work for, plus all
123
+ organizations that have control over, are under the control of,
124
+ or are under common control with that organization. **Control**
125
+ means ownership of substantially all the assets of an entity,
126
+ or the power to direct its management and policies by vote,
127
+ contract, or otherwise. Control can be direct or indirect.
128
+
129
+ **Your licenses** are all the licenses granted to you for the
130
+ software under these terms.
131
+
132
+ **Use** means anything you do with the software requiring one
133
+ of your licenses.
@@ -60,7 +60,7 @@ exports.TOOL_REGISTRY = [
60
60
  scriptsDir: path.join(HOME, '.claude', 'scripts'),
61
61
  settingsFile: path.join(HOME, '.claude', 'settings.json'),
62
62
  rulesFile: 'CLAUDE.md',
63
- mcpConfigFile: '.mcp.json',
63
+ mcpConfigFile: path.join(HOME, '.claude', 'mcp.json'),
64
64
  memoryDir: path.join(HOME, '.claude', 'projects'),
65
65
  },
66
66
  hooks: {
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/registry/tools.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0LH,oDASC;AAKD,kCAEC;AAKD,sCAEC;AAKD,8CAEC;AAtND,uCAAyB;AACzB,2CAA6B;AA2C7B,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAEb,QAAA,aAAa,GAAqB;IAC7C,kEAAkE;IAClE;QACE,EAAE,EAAE,QAAQ;QACZ,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE;YACT,UAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YACxC,YAAY,EAAE,CAAC,WAAW,EAAE,uBAAuB,CAAC;SACrD;QACD,KAAK,EAAE;YACL,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC;YACjD,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,eAAe,CAAC;YACzD,SAAS,EAAE,WAAW;YACtB,aAAa,EAAE,WAAW;YAC1B,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC;SAClD;QACD,KAAK,EAAE;YACL,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,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,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;YAC5C,IAAI,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC;gBAAE,OAAO,IAAI,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,EAAU;IACpC,OAAO,qBAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,qBAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,qBAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nex-level-code",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Nex Level Code (NLC) — 1-click setup for AI coding agent infrastructure. Memory, logging, workflow, and behavioral rules for Claude Code, Cursor, Codex, and more.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -40,7 +40,7 @@
40
40
  "nlc"
41
41
  ],
42
42
  "author": "FTay Consulting",
43
- "license": "MIT",
43
+ "license": "PolyForm-Noncommercial-1.0.0",
44
44
  "dependencies": {
45
45
  "@modelcontextprotocol/sdk": "^1.25.2",
46
46
  "commander": "^14.0.1",
@@ -25,4 +25,18 @@
25
25
  - Be concise and direct
26
26
  - Use plain language — avoid jargon unless the user uses it first
27
27
  - When presenting options, clearly distinguish proper solutions from workarounds
28
- - Never make confident assertions about things you're uncertain about
28
+ - Never make confident assertions about things you're uncertain about.
29
+
30
+ ## Sub-Agent Model Router (Mandatory)
31
+
32
+ Opus stays as the main conversation thread. ALL tasks are dispatched to sub-agents. Model selection is mechanical — no judgment calls.
33
+
34
+ | Question | Answer | Model |
35
+ |----------|--------|-------|
36
+ | Does the task modify any file? | No | **Haiku** |
37
+ | Has Opus specified the exact file(s), exact location, AND exact change? | All three yes | **Sonnet** |
38
+ | Missing any of the above? | — | **Opus** |
39
+
40
+ **Escape clause:** If a sub-agent encounters anything unexpected, it **stops and returns to Opus**. No improvising. No quick fixes. No alternative approaches.
41
+
42
+ **Trigger keyword: "Do it"** — When the user says "Do it", Opus MUST state the routing decision out loud before dispatching. Format: `Route: [task] → [Haiku/Sonnet/Opus] because [reason]`. User sees the route and can override before tokens are spent.
@@ -18,6 +18,26 @@
18
18
  ## Current Setup State
19
19
  <!-- What's installed, configured, and running. Update as things change. -->
20
20
 
21
+ ## Sub-Agent Model Router (Non-Negotiable)
22
+
23
+ Opus stays as the main conversation thread. ALL tasks are dispatched to sub-agents. The model is selected mechanically — no judgment, no "I think I can handle this."
24
+
25
+ **Rule 1 — Does the task modify any file?**
26
+ - No → **Haiku**
27
+ - Yes → go to Rule 2
28
+
29
+ **Rule 2 — Has Opus already specified ALL THREE?**
30
+ - (a) The exact file(s)
31
+ - (b) The exact location in the file
32
+ - (c) The exact change to make
33
+ - All three yes → **Sonnet**
34
+ - Missing any one → **Opus**
35
+
36
+ **Rule 3 — Escape clause**
37
+ If a sub-agent encounters ANYTHING unexpected, it **stops and returns to Opus**. No improvising. No "quick fix." No alternative approaches.
38
+
39
+ **Trigger keyword: "Do it"** — When the user says "Do it", Opus MUST pause and state the routing decision out loud before dispatching.
40
+
21
41
  ## Session Protocol
22
42
  - **START**: Read `session-handoff.md` first
23
43
  - **END**: Update `session-handoff.md` with what was done + what's next