kryptheon 0.1.3 → 0.1.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.
package/README.md CHANGED
@@ -1,86 +1,132 @@
1
- # kryptheon
2
-
3
- Record what you do in your app, and get told in plain English when it breaks.
4
-
5
- No test code to write, no config to edit.
6
-
7
- ## Use it
8
-
9
- Install it into your project first:
10
-
11
- ```
12
- npm i -D kryptheon
13
- ```
14
-
15
- This step is not optional. Every recording kryptheon writes starts with
16
- `import { test, expect } from 'kryptheon/kryptheon-fixture'`, and your tests can
17
- only find that import if kryptheon lives in your project's `node_modules`.
18
- Running `npx kryptheon` without installing will record fine but fail to check.
19
-
20
- Then record:
21
-
22
- ```
23
- npx kryptheon record https://your-app.example.com
24
- ```
25
-
26
- A browser opens. Use your app the way a customer would — click, type, sign in.
27
- Close the browser when you are done, and the recording is saved as a test.
28
-
29
- ```
30
- npx kryptheon check
31
- ```
32
-
33
- Runs everything you have recorded and reports what happened:
34
-
35
- ```
36
- OK Sign in (4.1s)
37
-
38
- X Checkout
39
- Could not find the button "Place order" on the page.
40
- This was working on 12 Mar at 9:14 AM.
41
- What to check: your last change may have renamed, hidden, or removed it.
42
- Where to look:
43
- - Browser was on: https://your-app.example.com/cart
44
- - POST /api/orders returned 500
45
- the server crashed or is unavailable - the error is in backend code, not the page
46
- ```
47
-
48
- Every failure also ends with a short summary you can paste straight into an AI
49
- coding tool.
50
-
51
- ## Automatic checks
52
-
53
- The first time a test passes, kryptheon remembers where the browser ended up
54
- and what the page was called. If either changes later, the test fails and tells
55
- you what changed — so a recording catches regressions without you writing a
56
- single assertion.
57
-
58
- When a change is intentional, accept it for that one test:
59
-
60
- ```
61
- npx kryptheon accept "Checkout"
62
- ```
63
-
64
- `npx kryptheon accept` on its own lists what has been saved.
65
-
66
- ## Files it creates in your folder
67
-
68
- | File | What it is |
69
- | --- | --- |
70
- | `tests/` | your recordings |
71
- | `kryptheon-baselines.json` | the remembered result for each test |
72
- | `kryptheon-history.jsonl` | one line per run, used for "this was working on …" |
73
-
74
- `.env` in the same folder is loaded automatically, so a recording can sign in
75
- without the password living in the test file.
76
-
77
- Worth adding to `.gitignore`: `.env`, `kryptheon-baselines.json`,
78
- `kryptheon-history.jsonl`, `test-results/`.
79
-
80
- ## Requirements
81
-
82
- Node 20.6 or later. The first run downloads a browser (about 200MB, once).
83
-
84
- ## Licence
85
-
86
- MIT
1
+ # kryptheon
2
+
3
+ Record a flow in your app once, replay it after every AI change, and get told in
4
+ plain English what broke.
5
+
6
+ Runs entirely on your machine. No account, no API key, nothing leaves your
7
+ computer. It is a wrapper around [Playwright](https://playwright.dev).
8
+
9
+ ## Install
10
+
11
+ ```
12
+ npm i -D kryptheon
13
+ ```
14
+
15
+ Install it into your project, not globally — every recording imports
16
+ `kryptheon/kryptheon-fixture`, and your tests can only find that if kryptheon is
17
+ in your project's `node_modules`.
18
+
19
+ ## Record
20
+
21
+ ```
22
+ npx kryptheon record https://your-app.example.com
23
+ ```
24
+
25
+ A browser opens. Use your app the way a customer would. Close the browser when
26
+ you are done, and the recording is saved as a test.
27
+
28
+ ## Check
29
+
30
+ ```
31
+ npx kryptheon check
32
+ ```
33
+
34
+ Runs everything you have recorded:
35
+
36
+ ```
37
+ OK Sign in (4.1s)
38
+
39
+ X Checkout
40
+ Could not find the button "Place order" on the page.
41
+ This was working on 12 Mar at 9:14 AM.
42
+ What to check: your last change may have renamed, hidden, or removed it.
43
+ Where to look:
44
+ - Browser was on: https://your-app.example.com/cart
45
+ - POST /api/orders returned 500
46
+ the server crashed or is unavailable - the error is in backend code, not the page
47
+ ```
48
+
49
+ Every failure ends with a short summary you can paste straight into an AI coding
50
+ tool.
51
+
52
+ ## Recording something that replays
53
+
54
+ A recording is only useful if it still works the second time. So:
55
+
56
+ - **Record one simple flow.** Sign in and look at a page. Open a thing and check
57
+ it loaded. Short beats thorough.
58
+ - **Sign in with an account that already exists.** Do not sign up during a
59
+ recording — the account exists next time, and the signup step fails.
60
+ - **Avoid steps that cannot repeat.** Adding data piles up a row on every run.
61
+ Logging out at the end means the next run does not start where this one did.
62
+
63
+ Kryptheon warns you about these after a recording, and names the exact step.
64
+
65
+ ## Make your AI assistant check its own work
66
+
67
+ An assistant will happily call a change done after only reading the code. This
68
+ writes a rule into the files assistants already read, so it has to run the check
69
+ first:
70
+
71
+ ```
72
+ npx kryptheon setup-ai
73
+ ```
74
+
75
+ It writes `CLAUDE.md`, `AGENTS.md` and `.cursorrules`. If a file already exists,
76
+ it adds a marked section at the end rather than overwriting anything, and
77
+ running it again replaces that section instead of adding a second copy.
78
+
79
+ The rule: after any change, run `npx kryptheon check`, show the output, and do
80
+ not report the work as done until it passes.
81
+
82
+ For an assistant running the check after every change, `--quiet` keeps the
83
+ conversation readable — one line when everything passes, the full explanation
84
+ only when something breaks:
85
+
86
+ ```
87
+ npx kryptheon check --quiet
88
+ ```
89
+
90
+ ```
91
+ OK 3 recordings still working.
92
+ ```
93
+
94
+ ## Automatic checks
95
+
96
+ The first time a test passes, kryptheon remembers where the browser ended up and
97
+ what the page was called. If either changes later, the test fails and says what
98
+ changed — so a recording catches regressions without you writing a single
99
+ assertion.
100
+
101
+ When a change is intentional, accept it for that one test:
102
+
103
+ ```
104
+ npx kryptheon accept "Checkout"
105
+ ```
106
+
107
+ `npx kryptheon accept` on its own lists what has been saved.
108
+
109
+ ## Files it creates in your folder
110
+
111
+ | File | What it is |
112
+ | --- | --- |
113
+ | `tests/` | your recordings |
114
+ | `kryptheon-baselines.json` | the remembered result for each test |
115
+ | `kryptheon-history.jsonl` | one line per run, used for "this was working on …" |
116
+
117
+ A `.env` in the same folder is loaded automatically, and anything you type into a
118
+ password box is replaced with an environment variable rather than written into
119
+ the test.
120
+
121
+ Worth adding to `.gitignore`: `.env`, `kryptheon-baselines.json`,
122
+ `kryptheon-history.jsonl`, `test-results/`.
123
+
124
+ ## Requirements
125
+
126
+ Node 20.6 or later. Recording needs a real terminal window — it opens a browser,
127
+ so it cannot run inside an AI coding assistant. The first run downloads a browser
128
+ (about 200MB, once).
129
+
130
+ ## Licence
131
+
132
+ MIT