@nolrm/contextkit 0.15.0 → 0.15.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.
- package/README.md +2 -2
- package/lib/commands/install.js +32 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ Each platform generates bridge files that the AI tool auto-reads. If a bridge fi
|
|
|
90
90
|
|
|
91
91
|
- Reads `glossary.md` → `checkout` = checkout process; `customer` = customer account
|
|
92
92
|
- Applies `code-style.md` → strict TS, functional components
|
|
93
|
-
- Follows `testing.md` → numbered test cases
|
|
93
|
+
- Follows `testing.md` → testing levels, change-driven test selection, numbered test cases
|
|
94
94
|
|
|
95
95
|
**Result (diff)**
|
|
96
96
|
|
|
@@ -161,7 +161,7 @@ ContextKit installs reusable slash commands for supported platforms:
|
|
|
161
161
|
| `/squad` | Kick off a squad task — one task or many (auto-detects batch mode). Pushes back with clarifying questions if the task is vague. |
|
|
162
162
|
| `/squad-architect` | Design the technical plan from the PO spec |
|
|
163
163
|
| `/squad-dev` | Implement code following the architect plan |
|
|
164
|
-
| `/squad-test` |
|
|
164
|
+
| `/squad-test` | Classify test levels, write and run tests against acceptance criteria |
|
|
165
165
|
| `/squad-review` | Review the full pipeline and give a verdict |
|
|
166
166
|
| `/squad-doc` | Create companion `.md` files for new/modified code after review passes |
|
|
167
167
|
| `/squad-auto` | Auto-run the full pipeline after kickoff (recommended, sequential) |
|
package/lib/commands/install.js
CHANGED
|
@@ -451,6 +451,38 @@ Your testing standards will be automatically generated based on your existing te
|
|
|
451
451
|
|
|
452
452
|
Run \`/analyze\` to generate this content.
|
|
453
453
|
|
|
454
|
+
## Testing Levels
|
|
455
|
+
|
|
456
|
+
Follow the **Testing Trophy** philosophy: integration tests are the sweet spot — they give the most confidence per test written. Unit tests cover isolated logic. E2E covers critical user paths only.
|
|
457
|
+
|
|
458
|
+
> Default bias: when in doubt, write an integration test, not a unit test.
|
|
459
|
+
|
|
460
|
+
### The Three Levels
|
|
461
|
+
|
|
462
|
+
| Level | What it tests | Typical tools |
|
|
463
|
+
|-------|--------------|--------------|
|
|
464
|
+
| **Unit** | A single function, class, or component in isolation — dependencies mocked | Jest, testing-library (component only) |
|
|
465
|
+
| **Integration / Page** | A full page or feature rendered with its real component tree — only external APIs/services mocked | Jest + testing-library, Supertest |
|
|
466
|
+
| **E2E** | A complete user flow in a real browser or process | Playwright, Cypress |
|
|
467
|
+
|
|
468
|
+
### Change-Driven Decision Table
|
|
469
|
+
|
|
470
|
+
Before writing any tests, classify what changed and apply the required level(s):
|
|
471
|
+
|
|
472
|
+
| What changed | Unit | Integration / Page | E2E |
|
|
473
|
+
|---|:---:|:---:|:---:|
|
|
474
|
+
| Pure function or utility | ✅ | — | — |
|
|
475
|
+
| New CLI command or module | ✅ | ✅ (cross-command) | — |
|
|
476
|
+
| UI component (used in 1 place) | ✅ | — | — |
|
|
477
|
+
| UI component (used in 2+ contexts: edit/view/create/…) | ✅ | ✅ one per context | — |
|
|
478
|
+
| New page or route | — | ✅ | — |
|
|
479
|
+
| Multi-step user flow | — | — | ✅ |
|
|
480
|
+
| Bug fix | At the level the bug was visible | | |
|
|
481
|
+
|
|
482
|
+
### Context Coverage Rule
|
|
483
|
+
|
|
484
|
+
If a component is rendered in **two or more contexts** (e.g. Edit page, View page, Create page), each context requires its own integration test. A single unit test is not sufficient — it cannot catch wiring bugs that only appear in context.
|
|
485
|
+
|
|
454
486
|
## ⭐ REQUIRED: Numbered Test Cases
|
|
455
487
|
|
|
456
488
|
**All test cases MUST use numbered descriptions for easy tracking and debugging:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nolrm/contextkit",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "ContextKit - Context Engineering for AI Development. Provide rich context to AI through structured MD files with standards, code guides, and documentation. Works with Cursor, Claude, Aider, VS Code Copilot, and more.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|