nitro_kit 2.0.0.alpha.4 → 2.0.0.alpha.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4ea3ffdd5e6404639ac11c27f5eb4798b2d29b0103b360404b964c46ffed908
4
- data.tar.gz: 5a1141716d12a4e3f30969f9971da1d844d44d057e856bd6ed2d1ea0a99fec2d
3
+ metadata.gz: 2f703b97ad2c84b8c66a306453dd1070554fe7c45f994a36672639af781856ed
4
+ data.tar.gz: 9343dd1db39ec96141f560eeebf0edd873d3b68960a36ffdc0abe413b0b66491
5
5
  SHA512:
6
- metadata.gz: 03b102d89337de8a13f54b0e1e52163897f5d215ea1810d979f3fa4d0985b86e03bd8c9702e9aedccf21d9252e3cdfab23ccf6686cf79caa85f7d383c1af65f0
7
- data.tar.gz: f2a33cc6791355080ff7439e714dd2d7c44f4ce706f36817cb7c1c9f42286323bec458c9238e1adb3bbf6807aae57ffedc40b2fd3b49b523027d7b9aa97a0d95
6
+ metadata.gz: 13e10affc36f849b140ee76f99fb6c7ce4403767d1b2da3a20decb2d15fbcc898bf725b637db7d1f2476c7fd12059e4ffb4449a137309253119de03eb18450a6
7
+ data.tar.gz: 4889ff8fdd803acfb652511c0938247a5edc0e1ead51687c5ed97966bf2493038def6d2d34b91a1b498310d78c62390ab29cee5fce3763393e9aa01f986263e0
data/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.0.0.alpha.5
6
+
7
+ ### Added
8
+
9
+ - Add a copyable product bootstrap prompt that tells coding agents to install
10
+ Nitro Kit before planning an application and to discover optional product
11
+ patterns when catalog tools are available.
12
+
13
+ ### Changed
14
+
15
+ - Teach the installed agent guidance and bundled Codex plugin to search an
16
+ available Nitro Kit catalog by product workflow without making catalog access
17
+ a requirement, and clarify that Nitro Kit Doctor checks integration health
18
+ rather than product completeness.
19
+
5
20
  ## 2.0.0.alpha.4
6
21
 
7
22
  ### Added
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Audience:** Rails developers evaluating or installing Nitro Kit.
8
8
 
9
- Nitro Kit is a gem-owned Phlex UI system for Rails. The `2.0.0.alpha.4` prerelease
9
+ Nitro Kit is a gem-owned Phlex UI system for Rails. The `2.0.0.alpha.5` prerelease
10
10
  is under active testing and is not stable.
11
11
 
12
12
  [![RubyGems](https://img.shields.io/gem/v/nitro_kit.svg)](https://rubygems.org/gems/nitro_kit)
@@ -16,7 +16,7 @@ is under active testing and is not stable.
16
16
  Pin the prerelease:
17
17
 
18
18
  ```ruby
19
- gem "nitro_kit", "2.0.0.alpha.4"
19
+ gem "nitro_kit", "2.0.0.alpha.5"
20
20
  ```
21
21
 
22
22
  ```sh
@@ -42,6 +42,21 @@ Nitro Kit targets maintained evergreen browsers from roughly the previous two
42
42
  years, with Mobile Safari as a first-class target. See the
43
43
  [browser support policy](docs/browser_support.md) for exact fallback behavior.
44
44
 
45
+ ## Prompting a coding agent
46
+
47
+ Add this to a product bootstrap prompt so the agent installs Nitro Kit, uses
48
+ its guidance, and discovers optional product patterns when available:
49
+
50
+ ```text
51
+ Add Nitro Kit 2 to this Rails app and use it for the product's application UI.
52
+
53
+ Set up Nitro Kit before planning or implementing the product:
54
+ - Add and pin the current Nitro Kit 2 prerelease in the Gemfile, run bundle install, run bin/rails generate nitro_kit:install, and run bin/rails nitro_kit:doctor.
55
+ - Load the generated project-local Nitro Kit skills and installed, version-matched docs.
56
+ - Check whether Nitro Kit catalog or MCP tools are available. If they are, inventory and search them by product workflow, retrieve relevant patterns, and state what you will use, adapt, or defer.
57
+ - If no catalog is available, continue with the bundled docs and component contracts; catalog access is optional.
58
+ ```
59
+
45
60
  Maintaining Nitro Kit 1? Its frozen documentation remains at
46
61
  [v1.nitrokit.dev](https://v1.nitrokit.dev).
47
62
 
data/docs/agent_guide.md CHANGED
@@ -35,6 +35,28 @@ Read this guide from that directory. The installed
35
35
  Before changing a Nitro Kit 1.x application, read the migration guide. Do not
36
36
  infer 2.x APIs from memory or old application code.
37
37
 
38
+ ## Discover optional product patterns
39
+
40
+ The installed skills, documentation, component contracts, and source are the
41
+ complete required path for using Nitro Kit. A Nitro Kit catalog may also be
42
+ available through MCP or another tool, but catalog access is optional and must
43
+ never block the work.
44
+
45
+ For greenfield planning or broad product work:
46
+
47
+ 1. Check whether Nitro Kit catalog or MCP tools are available.
48
+ 2. When available, inventory the catalog, then search by product workflow rather
49
+ than component name.
50
+ 3. Retrieve the relevant patterns before implementation and record which will be
51
+ used, adapted, or deferred.
52
+ 4. When unavailable, continue with the installed guidance and report no catalog
53
+ coverage claims.
54
+
55
+ For a focused component or interaction change, search only when a catalog tool
56
+ is already available and the task could benefit from a higher-level pattern.
57
+ `nitro_kit:doctor` validates installation and runtime contracts; it is not a
58
+ product-completeness audit.
59
+
38
60
  ## Preserve the application's architecture
39
61
 
40
62
  For a greenfield application, run:
@@ -4,7 +4,7 @@
4
4
  API. This table is also parsed by the gallery; keep every row to four cells and
5
5
  escape literal pipe characters.
6
6
 
7
- This is the shipped public catalog for `2.0.0.alpha.4`. It records current Ruby
7
+ This is the shipped public catalog for `2.0.0.alpha.5`. It records current Ruby
8
8
  construction, rendered roots, closed vocabularies, compound cardinalities, and
9
9
  integration boundaries. For task guidance, start with the
10
10
  [agent guide](agent_guide.md) or [Rails integration](rails_integration.md).
@@ -6,20 +6,26 @@
6
6
  `2.`.
7
7
  2. Choose the project-local Nitro Kit skill matching the task. It will resolve
8
8
  and read the installed, version-matched `docs/agent_guide.md`.
9
- 3. Inspect the application before editing. Preserve established view, asset,
9
+ 3. For greenfield planning or broad product work, check whether Nitro Kit
10
+ catalog or MCP tools are available. When available, inventory and search by
11
+ product workflow, retrieve relevant patterns, and state what will be used,
12
+ adapted, or deferred. When unavailable, continue with the bundled guidance;
13
+ catalog access is optional and must never block the work.
14
+ 4. Inspect the application before editing. Preserve established view, asset,
10
15
  authentication, and testing conventions unless the task changes them.
11
- 4. For a greenfield application, run `bin/rails generate phlex:install` and use
16
+ 5. For a greenfield application, run `bin/rails generate phlex:install` and use
12
17
  Phlex for the application layout, route views, and reusable UI. In an
13
18
  established application, introduce Phlex only at the requested boundary.
14
19
  Do not perform an application-wide migration unless it is explicitly
15
20
  authorized.
16
- 5. Verify that the application loads Nitro Kit CSS, the appearance bootstrap,
21
+ 6. Verify that the application loads Nitro Kit CSS, the appearance bootstrap,
17
22
  Turbo, Stimulus, and the normal Stimulus controller loader. Never copy Nitro
18
23
  components or `nk--*` controllers into the application.
19
- 6. Verify one application base component includes `NitroKit`, and model-backed
24
+ 7. Verify one application base component includes `NitroKit`, and model-backed
20
25
  forms select `NitroKit::FormBuilder` explicitly.
21
- 7. Run `bin/rails nitro_kit:doctor`, fix actionable failures, and run the
22
- application's relevant tests.
26
+ 8. Run `bin/rails nitro_kit:doctor`, fix actionable failures, and run the
27
+ application's relevant tests. Doctor verifies Nitro Kit integration, not
28
+ whether the product implements every relevant workflow.
23
29
 
24
30
  If this is a Nitro Kit 1.x migration, stop and follow
25
31
  `docs/migration_1_to_2.md` from the installed gem. Replace a control only when
@@ -12,7 +12,7 @@ Treat a 1.x migration as a product-flow review, not a helper rename. Nitro Kit
12
12
  Add the 2.0 prerelease to the application's Gemfile:
13
13
 
14
14
  ```ruby
15
- gem "nitro_kit", "2.0.0.alpha.4"
15
+ gem "nitro_kit", "2.0.0.alpha.5"
16
16
  ```
17
17
 
18
18
  Bundler records the exact released version in `Gemfile.lock`; commit `Gemfile`
@@ -12,7 +12,7 @@ There are no `nk_form_with` helpers or general ERB component bridge.
12
12
  Pin the current prerelease:
13
13
 
14
14
  ```ruby
15
- gem "nitro_kit", "2.0.0.alpha.4"
15
+ gem "nitro_kit", "2.0.0.alpha.5"
16
16
  ```
17
17
 
18
18
  Use the released gem and commit `Gemfile` with `Gemfile.lock`. Before upgrading,
@@ -23,6 +23,14 @@ module NitroKit
23
23
  Each skill resolves the installed gem with `bundle show nitro_kit` and reads
24
24
  its version-matched documentation.
25
25
 
26
+ For greenfield planning or broad product work, check whether Nitro Kit
27
+ catalog or MCP tools are available. When they are, inventory and search the
28
+ catalog by product workflow, retrieve the relevant patterns, and state what
29
+ will be used, adapted, or deferred before implementation. When they are not,
30
+ continue with the bundled skills, documentation, and component contracts;
31
+ catalog access is optional and must never block the work. Nitro Kit Doctor
32
+ verifies integration health, not product completeness.
33
+
26
34
  In a greenfield application, run `bin/rails generate phlex:install` and use
27
35
  Phlex for the application layout, route views, and reusable UI. In an
28
36
  established application, preserve its existing view architecture and
@@ -1,3 +1,3 @@
1
1
  module NitroKit
2
- VERSION = "2.0.0.alpha.4"
2
+ VERSION = "2.0.0.alpha.5"
3
3
  end
@@ -14,15 +14,15 @@
14
14
  "interface": {
15
15
  "displayName": "Nitro Kit",
16
16
  "shortDescription": "Build Rails UI with Nitro Kit and Hotwire",
17
- "longDescription": "Model conventional Rails resources, compose Nitro Kit components, and implement Hotwire interactions from the installed gem version.",
17
+ "longDescription": "Model conventional Rails resources, compose Nitro Kit components, implement Hotwire interactions from the installed gem version, and use optional catalog guidance when available.",
18
18
  "developerName": "Mikkel Malmberg",
19
19
  "category": "Developer",
20
20
  "capabilities": ["Read", "Write"],
21
21
  "websiteURL": "https://nitrokit.dev",
22
22
  "defaultPrompt": [
23
- "Build this Rails feature on the Nitro Kit Rails path.",
24
- "Build this Rails interface with Nitro Kit components.",
25
- "Implement this interaction with Nitro Kit and conventional Hotwire."
23
+ "Build this Rails feature on the Nitro Kit Rails path, using relevant catalog guidance when available.",
24
+ "Build this Rails interface with Nitro Kit components and any relevant catalog guidance available.",
25
+ "Implement this interaction with Nitro Kit, conventional Hotwire, and relevant catalog guidance when available."
26
26
  ]
27
27
  }
28
28
  }
@@ -25,6 +25,18 @@ Make the server response and stable DOM boundary the interaction API. Add Stimul
25
25
  7. Read `NITRO_KIT_ROOT/docs/browser_support.md` for the canonical
26
26
  full/reduced/unavailable no-JavaScript classification.
27
27
 
28
+ ## Discover optional catalog guidance
29
+
30
+ For a broad product workflow, check whether Nitro Kit catalog or MCP tools are
31
+ available. When they are, inventory and search by workflow, retrieve relevant
32
+ patterns, and state what will be used, adapted, or deferred before
33
+ implementation. When they are not, continue with the installed Hotwire recipes,
34
+ component contracts, and source. Catalog access is optional and must never
35
+ block the work or be implied in the result.
36
+
37
+ For a focused interaction, use the catalog only when it is already available
38
+ and a higher-level pattern would materially help.
39
+
28
40
  Do not proceed with a remembered Nitro Kit 1.x API. Do not copy or recreate
29
41
  the installed gem's `nk--*` controllers under `app/javascript/controllers/nk`.
30
42
 
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Nitro Kit Hotwire"
3
3
  short_description: "Build conventional Nitro Kit Hotwire flows"
4
- default_prompt: "Use $nitro-kit-hotwire to build this interaction with Nitro Kit and conventional Hotwire."
4
+ default_prompt: "Use $nitro-kit-hotwire to build this interaction with Nitro Kit, conventional Hotwire, and relevant catalog guidance when available."
@@ -24,6 +24,18 @@ established application outside the requested scope.
24
24
  9. Read `NITRO_KIT_ROOT/docs/browser_support.md` before claiming an
25
25
  interaction works without JavaScript.
26
26
 
27
+ ## Discover optional catalog guidance
28
+
29
+ For greenfield planning or broad product work, check whether Nitro Kit catalog
30
+ or MCP tools are available. When they are, inventory and search by product
31
+ workflow, retrieve the relevant patterns, and state what will be used, adapted,
32
+ or deferred before implementation. When they are not, continue with the
33
+ installed skills, documentation, component contracts, and source. Catalog
34
+ access is optional and must never block the work or be implied in the result.
35
+
36
+ For a focused Rails change, use the catalog only when it is already available
37
+ and the task could benefit from a higher-level product pattern.
38
+
27
39
  Never use a Nitro Kit 1.x helper, copied component, controller, or Tailwind
28
40
  contract as a substitute for the installed API.
29
41
 
@@ -70,3 +82,6 @@ Nitro Kit owns component contracts and focused progressive behavior.
70
82
  Run focused model and request tests first. Add a system test only where browser
71
83
  behavior is part of the contract. Assert status, visibility, authorization,
72
84
  and stable DOM boundaries rather than implementation trivia.
85
+
86
+ Nitro Kit Doctor verifies integration and runtime contracts, not product
87
+ completeness. For broad work, verify the agreed workflow coverage separately.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Nitro Kit Rails"
3
3
  short_description: "Build conventional Rails applications with Nitro Kit"
4
- default_prompt: "Use $nitro-kit-rails to build this feature on the Nitro Kit Rails path."
4
+ default_prompt: "Use $nitro-kit-rails to build this feature on the Nitro Kit Rails path, using relevant catalog guidance when available."
@@ -18,14 +18,25 @@ Use the documentation shipped with the application's installed gem as the source
18
18
  classifications in `NITRO_KIT_ROOT/docs/browser_support.md`.
19
19
  7. Inspect the installed component source when constructor or compound-slot details remain unclear. Never guess a component API from memory.
20
20
 
21
+ ## Discover optional catalog guidance
22
+
23
+ For greenfield planning or broad product UI work, check whether Nitro Kit
24
+ catalog or MCP tools are available. When they are, inventory and search by
25
+ product workflow, retrieve the relevant patterns, and state what will be used,
26
+ adapted, or deferred before implementation. When they are not, continue with
27
+ the installed skills, documentation, component contracts, and source. Catalog
28
+ access is optional and must never block the work or be implied in the result.
29
+
30
+ For a focused component change, use the catalog only when it is already
31
+ available and a higher-level composition would materially help.
32
+
21
33
  For a Nitro Kit 1.x migration, read
22
34
  `NITRO_KIT_ROOT/docs/migration_1_to_2.md` before editing. Inventory product
23
35
  flows, behavior, application-owned button classes and Rails button helpers,
24
36
  joined controls, and the existing semantic color, focus, radius, density, and
25
37
  typography tokens first. Capture representative wide and narrow screenshots.
26
- If the Nitro Kit MCP catalog is available, search it by workflow rather than
27
- old component name, then select high-level compositions before replacing
28
- atoms.
38
+ Apply the optional catalog process above, searching by workflow rather than old
39
+ component name and selecting high-level compositions before replacing atoms.
29
40
 
30
41
  If the gem is not installed, say that the skill requires Nitro Kit and follow the application's requested installation scope. Do not substitute APIs from an older Nitro Kit release.
31
42
 
@@ -76,4 +87,8 @@ If the gem is not installed, say that the skill requires Nitro Kit and follow th
76
87
 
77
88
  Run the smallest relevant application tests. For component rendering, assert semantic elements and owned `data-nk` or slot attributes rather than private implementation helpers. Exercise invalid and empty states when the UI accepts user input or collections.
78
89
 
90
+ Nitro Kit Doctor verifies integration and runtime contracts, not product
91
+ completeness. Do not use a green Doctor result as proof that every relevant
92
+ screen, state, or catalog workflow has been implemented.
93
+
79
94
  For a migration, Doctor is an inventory, not visual proof. Run representative form and component rendering with `ActiveModel::Translation.raise_on_missing_translations` enabled when the application uses strict i18n. Compare the same representative flows in a browser at wide and narrow widths, exercise keyboard focus, and inspect computed styles for missing application classes, stacked Button content, broken compound corners, double focus rings, clipping, and theme drift. Re-audit rendered native buttons, Rails button helpers, and application-owned button classes before declaring the conversion complete. Search the whole application for `desperately_need_a_class:` and review every result, aiming for zero. Move layout and visual treatment to application-owned wrappers, remove generic class forwarding, accept incidental Nitro defaults, and keep unmatched product UI application-owned; retain only documented external-integration hooks.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Nitro Kit UI"
3
3
  short_description: "Build Rails interfaces with Nitro Kit components"
4
- default_prompt: "Use $nitro-kit-ui to build this Rails interface with the installed Nitro Kit components."
4
+ default_prompt: "Use $nitro-kit-ui to build this Rails interface with the installed Nitro Kit components and any relevant catalog guidance available."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nitro_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.alpha.4
4
+ version: 2.0.0.alpha.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg