@nanopm/cli 0.1.18 → 0.1.20
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/dist/index.js +637 -577
- package/package.json +1 -1
- package/skills/build/SKILL.md +19 -5
package/package.json
CHANGED
package/skills/build/SKILL.md
CHANGED
|
@@ -24,20 +24,34 @@ NanoPM commits each step for you and opens the pull request when you are done.
|
|
|
24
24
|
2. If the code contradicts the spec — what it asks already exists, a step it assumes is not
|
|
25
25
|
there, the size does not hold — `ask_user` before you plan: what the spec says, what the code
|
|
26
26
|
has, what it changes, and the options. Do not guess what the founder decided.
|
|
27
|
-
3. `build_plan`:
|
|
28
|
-
|
|
27
|
+
3. `build_plan`: first, in `understood`, what you understood, in your own words and plain
|
|
28
|
+
language — the problem, what you will change, what you will not touch. The founder reads it
|
|
29
|
+
before anything else; a misunderstanding must show there, not in the pull request. Then your
|
|
30
|
+
plan, 1 to 8 steps, in order, each a change the founder can recognise, in their words. The last
|
|
31
|
+
step is your check of the whole change: the project's checks, then the app itself (step 5).
|
|
29
32
|
4. Build one step at a time. After each: run its tests and the project's own checks (the ones
|
|
30
33
|
CLAUDE.md, the README or `package.json` name), fix what they report, then `build_step` with the
|
|
31
34
|
step's number and one line on what you did. NanoPM commits right then, so a step is committed
|
|
32
35
|
only when it works. Never run `git commit`, `git push` or anything that rewrites history.
|
|
33
|
-
5.
|
|
36
|
+
5. **Check each acceptance criterion**, inside your last step: go through each one of
|
|
37
|
+
`.nanopm/SPEC.md` and check it as close to what the user sees as you can here — run the code
|
|
38
|
+
path it names (call the handler, run the script, render the component), and note what you saw.
|
|
39
|
+
Your sandbox cannot open a local port, so a running server, a browser or a device is out of
|
|
40
|
+
reach: say so for what needs one. Never touch a database, a service or a file outside your copy
|
|
41
|
+
to check something. Keep package caches in `$TMPDIR` (`npm install --cache "$TMPDIR/npm"`, a
|
|
42
|
+
pnpm store there): your home is outside the sandbox. Stop everything you started before you
|
|
43
|
+
finish.
|
|
44
|
+
6. When every step is done, stop with a short report, in the founder's words, which becomes the
|
|
34
45
|
pull request's description:
|
|
35
46
|
- **What was built**: two or three sentences.
|
|
36
47
|
- **Decisions I made**: each choice the spec left open, with its why.
|
|
37
48
|
- **Differs from the spec**: or *Nothing*.
|
|
38
49
|
- **Left to do**: or *Nothing*.
|
|
39
|
-
- **How I checked it**:
|
|
40
|
-
|
|
50
|
+
- **How I checked it**: first one line per acceptance criterion, exactly `- AC1 — saw: what you
|
|
51
|
+
saw` or `- AC1 — could not: what, because why`. *Saw* is for what you saw happen when you ran
|
|
52
|
+
the code the criterion is about — say how (a handler called with what, a script's output);
|
|
53
|
+
what you could not reach is *could not*, with why. Never say you saw what you did not run. Then the commands you ran, and their result.
|
|
54
|
+
7. `log` one line: what you built.
|
|
41
55
|
|
|
42
56
|
## When to ask the founder
|
|
43
57
|
|