@pasosdejesus/mpdj 0.3.2 → 0.3.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.
Files changed (3) hide show
  1. package/SKILL.md +66 -7
  2. package/dist/SKILL.md +66 -7
  3. package/package.json +2 -2
package/SKILL.md CHANGED
@@ -113,6 +113,10 @@ Reads files and copies content to clipboard.
113
113
  ./bin/m ai:readfile <file> [--head <N>] [--tail <N>] [--offset <N>] [--lines <N>] [--raw] [--no-clip]
114
114
  ```
115
115
 
116
+ A range is `--offset <start> --lines <count>`: there is **no** `--lines 60-75`.
117
+ Ask for the narrowest window that contains the block, so the agent receives the
118
+ file's real line breaks (see rule 6 of `ai:edit`).
119
+
116
120
  ### ai:writefile
117
121
 
118
122
  Creates/replaces files from clipboard content.
@@ -123,14 +127,57 @@ Creates/replaces files from clipboard content.
123
127
 
124
128
  ### ai:edit
125
129
 
126
- Applies changes from clipboard (3 formats: full block, SEARCH/REPLACE, unified diff).
127
-
128
- > [WARN] Paths are relative to current directory. `___SEARCH___` must be exact copy including whitespace. Fuzzy matching (85%).
130
+ Applies the changes a chat generated, from the clipboard or from a file.
129
131
 
130
132
  ```bash
131
- ./bin/m ai:edit
133
+ ./bin/m ai:edit # clipboard
134
+ ./bin/m ai:edit --input answer.txt # same thing, reproducible
135
+ ./bin/m ai:edit --dry-run # show what would change, touch nothing
136
+ ```
137
+
138
+ **The format that works** — one block per file, several blocks in one paste are
139
+ fine:
140
+
141
+ ```text
142
+ ## Edit: resources/en/guide1.md
143
+ ___BUSCAR_20261030T1200___
144
+ exact text taken from the file, indentation included
145
+ ___REMPLAZAR_20261030T1200___
146
+ the new text
147
+ ___FIN_20261030T1200___
132
148
  ```
133
149
 
150
+ Rules, in the order they usually bite:
151
+
152
+ 1. **The path is relative to where the command runs.** Run `ai:edit` from the
153
+ project root, or write the path as that directory sees it. When the file is
154
+ not there, `ai:edit` looks in the parent directories and prints a hint
155
+ (`[HINT]` / `[PISTA]`) with the path that does exist.
156
+ 2. **`___BUSCAR_` must be an exact copy of the file**, whitespace included. Get
157
+ it with `./bin/m ai:readfile <file>`; never rebuild it from memory. Matching
158
+ is fuzzy only above 85% and it says so.
159
+ 3. **The three markers must carry the same stamp.** The stamp itself is free
160
+ (`20261030`, `20261030T1200`, an ISO date); it only groups the markers.
161
+ 4. **Triple-backtick fences around the block are decoration**: optional, and
162
+ balanced if used. Never wrap the block in a second fence "so it looks
163
+ right": paste from `## Edit:` through `___FIN_` and nothing else.
164
+ 5. One block, one file. No prose inside the block, no partial blocks, no
165
+ `...` elisions: an elided block will not match.
166
+ 6. **Do not reflow the text.** Line breaks are part of `___BUSCAR_`: a markdown
167
+ paragraph is 4 long lines in the file and the chat is tempted to "wrap it
168
+ nicely" into 5 short ones. That drops the match to 90-95 % (fuzzy), applies
169
+ anyway, and rewrites the file's line breaks — a clean diff becomes noise. If
170
+ the wording is exact but the break is not, the block is still wrong.
171
+
172
+ Other accepted formats: `## Archivo:` + the whole file inside a fence, or a
173
+ unified diff.
174
+
175
+ When the paste cannot be understood, `ai:edit` says **what is wrong** (the fence
176
+ that is never closed, with its line number; a missing marker; stamps that
177
+ differ; a missing header) instead of a generic "no changes found". When a block
178
+ does not match the file, it copies the diagnostic to the clipboard for the
179
+ agent to read.
180
+
134
181
  ### ai:grep
135
182
 
136
183
  Searches text in files (or clipboard if no `--path`).
@@ -151,8 +198,12 @@ File search by glob pattern.
151
198
 
152
199
  1. **Ask, don't order.**
153
200
  2. **Always use `ai:readfile` before suggesting changes.**
154
- 3. **Use `ai:edit` with SEARCH/REPLACE** for specific changes.
201
+ 3. **Use `ai:edit` with SEARCH/REPLACE** for specific changes, in the exact shape
202
+ of `### ai:edit` above: `## Edit: <path>`, the three markers with the same
203
+ stamp, and an exact `___BUSCAR_` block.
155
204
  4. **NEVER assume content.** If replacement fails, `ai:edit` copies diagnostic to clipboard.
205
+ 5. **Give the whole block, never a fragment**: from `## Edit:` through
206
+ `___FIN_`, with no extra fence and no ellipses.
156
207
 
157
208
  ### Recommended workflow
158
209
 
@@ -208,7 +259,7 @@ If you have direct terminal and filesystem access (Crush, Cursor, etc.), **do no
208
259
  # --install, --build, --prepare (opt-in); --ready is an alias
209
260
  ./bin/m eng:verify [<motor>] # Guards the generated file against the sources and the intention
210
261
  ./bin/m eng:remove <motor> [--drop] # Removes a vendored copy (--drop also drops its model tables)
211
- ./bin/m eng:check [--runtime] # Schema vs DB + vendored drift + self-containment; --runtime probes LOAD_*
262
+ ./bin/m eng:check [--runtime] [--no-db] # Schema vs DB + vendored drift + self-containment; --runtime probes LOAD_*
212
263
  ./bin/m eng:setup [<motor>] [--check] # Generic: writes the motor migrations (db/migrations)
213
264
  ./bin/m eng:seed [<motor>] [--force] [--check] # Generic: loads db/seed.sql.gz; msip keeps its idempotent seed
214
265
  ./bin/m eng:msip:setup # Writes the `msip` base model migrations into the consumer
@@ -305,6 +356,8 @@ Full recipe: [doc/engines.md](../../doc/engines.md) §12; release ritual:
305
356
  - **OS:** OpenBSD/adJ (primary), Linux/Ubuntu (secondary, see `doc/ubuntu-compat.md`)
306
357
  - **pnpm:** v11 (pinned via `packageManager` and `pnpm-workspace.yaml`; v11 requires `allowBuilds` and ignores the `pnpm` field of `package.json`, see `doc/pnpm.md`)
307
358
  - **Build:** `pnpm run build`, **Tests:** `make test`
359
+ - **Release:** `make release-check` (manifests: optional deps and peers use ranges) and
360
+ `make publish PKGS="..."`; ritual in [doc/version-bump.md](../../doc/version-bump.md)
308
361
  - Rollup WASM: `npm:@rollup/wasm-node` in `pnpm-workspace.yaml`
309
362
  - RPC: `NEXT_PUBLIC_RPC_URL` or `RPC_URL` in `.env`
310
363
  - PostgreSQL credentials for tests in `tests/test-project/apps/.env.test`
@@ -314,10 +367,16 @@ Full recipe: [doc/engines.md](../../doc/engines.md) §12; release ritual:
314
367
  ```bash
315
368
  ./bin/m contract:test [--fork-url <url>] [--fork-block <N>] [--verbose]
316
369
  ./bin/m contract:compile [--solc <path>|--solc-js <soljson>|--solc-version <v>]
370
+ ./bin/m contract:typechain [--target ethers-v6] [--out-dir typechain-types]
371
+ ./bin/m contract:node [--host 127.0.0.1] [--port 8545]
372
+ ./bin/m contract:deploy --contract <Name> --network <net> [--rpc <url>] [--args '[...]']
373
+ ./bin/m contract:verify --contract <Name> --network <net> [--api-url <url>] [--dry-run]
374
+ ./bin/m contract:clean
317
375
  ./bin/m contract:checkdeploy [--json|--strict|--root <dir>|--network <name>]
318
376
  ```
319
377
  Runs Hardhat-compatible tests on OpenBSD/adJ using `@ethereumjs/vm` (EDR replacement);
320
- `contract:compile` compiles without Hardhat and `contract:checkdeploy` validates deployment addresses.
378
+ compiles, generates types, runs a local node, deploys/verifies with viem and cleans without Hardhat;
379
+ `contract:checkdeploy` validates deployment addresses.
321
380
  See [doc/edr.md](../../doc/edr.md) and [issue #7](https://gitlab.com/pasosdeJesus/m/-/issues/7).
322
381
 
323
382
  ### E2E Test Commands
package/dist/SKILL.md CHANGED
@@ -113,6 +113,10 @@ Reads files and copies content to clipboard.
113
113
  ./bin/m ai:readfile <file> [--head <N>] [--tail <N>] [--offset <N>] [--lines <N>] [--raw] [--no-clip]
114
114
  ```
115
115
 
116
+ A range is `--offset <start> --lines <count>`: there is **no** `--lines 60-75`.
117
+ Ask for the narrowest window that contains the block, so the agent receives the
118
+ file's real line breaks (see rule 6 of `ai:edit`).
119
+
116
120
  ### ai:writefile
117
121
 
118
122
  Creates/replaces files from clipboard content.
@@ -123,14 +127,57 @@ Creates/replaces files from clipboard content.
123
127
 
124
128
  ### ai:edit
125
129
 
126
- Applies changes from clipboard (3 formats: full block, SEARCH/REPLACE, unified diff).
127
-
128
- > [WARN] Paths are relative to current directory. `___SEARCH___` must be exact copy including whitespace. Fuzzy matching (85%).
130
+ Applies the changes a chat generated, from the clipboard or from a file.
129
131
 
130
132
  ```bash
131
- ./bin/m ai:edit
133
+ ./bin/m ai:edit # clipboard
134
+ ./bin/m ai:edit --input answer.txt # same thing, reproducible
135
+ ./bin/m ai:edit --dry-run # show what would change, touch nothing
136
+ ```
137
+
138
+ **The format that works** — one block per file, several blocks in one paste are
139
+ fine:
140
+
141
+ ```text
142
+ ## Edit: resources/en/guide1.md
143
+ ___BUSCAR_20261030T1200___
144
+ exact text taken from the file, indentation included
145
+ ___REMPLAZAR_20261030T1200___
146
+ the new text
147
+ ___FIN_20261030T1200___
132
148
  ```
133
149
 
150
+ Rules, in the order they usually bite:
151
+
152
+ 1. **The path is relative to where the command runs.** Run `ai:edit` from the
153
+ project root, or write the path as that directory sees it. When the file is
154
+ not there, `ai:edit` looks in the parent directories and prints a hint
155
+ (`[HINT]` / `[PISTA]`) with the path that does exist.
156
+ 2. **`___BUSCAR_` must be an exact copy of the file**, whitespace included. Get
157
+ it with `./bin/m ai:readfile <file>`; never rebuild it from memory. Matching
158
+ is fuzzy only above 85% and it says so.
159
+ 3. **The three markers must carry the same stamp.** The stamp itself is free
160
+ (`20261030`, `20261030T1200`, an ISO date); it only groups the markers.
161
+ 4. **Triple-backtick fences around the block are decoration**: optional, and
162
+ balanced if used. Never wrap the block in a second fence "so it looks
163
+ right": paste from `## Edit:` through `___FIN_` and nothing else.
164
+ 5. One block, one file. No prose inside the block, no partial blocks, no
165
+ `...` elisions: an elided block will not match.
166
+ 6. **Do not reflow the text.** Line breaks are part of `___BUSCAR_`: a markdown
167
+ paragraph is 4 long lines in the file and the chat is tempted to "wrap it
168
+ nicely" into 5 short ones. That drops the match to 90-95 % (fuzzy), applies
169
+ anyway, and rewrites the file's line breaks — a clean diff becomes noise. If
170
+ the wording is exact but the break is not, the block is still wrong.
171
+
172
+ Other accepted formats: `## Archivo:` + the whole file inside a fence, or a
173
+ unified diff.
174
+
175
+ When the paste cannot be understood, `ai:edit` says **what is wrong** (the fence
176
+ that is never closed, with its line number; a missing marker; stamps that
177
+ differ; a missing header) instead of a generic "no changes found". When a block
178
+ does not match the file, it copies the diagnostic to the clipboard for the
179
+ agent to read.
180
+
134
181
  ### ai:grep
135
182
 
136
183
  Searches text in files (or clipboard if no `--path`).
@@ -151,8 +198,12 @@ File search by glob pattern.
151
198
 
152
199
  1. **Ask, don't order.**
153
200
  2. **Always use `ai:readfile` before suggesting changes.**
154
- 3. **Use `ai:edit` with SEARCH/REPLACE** for specific changes.
201
+ 3. **Use `ai:edit` with SEARCH/REPLACE** for specific changes, in the exact shape
202
+ of `### ai:edit` above: `## Edit: <path>`, the three markers with the same
203
+ stamp, and an exact `___BUSCAR_` block.
155
204
  4. **NEVER assume content.** If replacement fails, `ai:edit` copies diagnostic to clipboard.
205
+ 5. **Give the whole block, never a fragment**: from `## Edit:` through
206
+ `___FIN_`, with no extra fence and no ellipses.
156
207
 
157
208
  ### Recommended workflow
158
209
 
@@ -208,7 +259,7 @@ If you have direct terminal and filesystem access (Crush, Cursor, etc.), **do no
208
259
  # --install, --build, --prepare (opt-in); --ready is an alias
209
260
  ./bin/m eng:verify [<motor>] # Guards the generated file against the sources and the intention
210
261
  ./bin/m eng:remove <motor> [--drop] # Removes a vendored copy (--drop also drops its model tables)
211
- ./bin/m eng:check [--runtime] # Schema vs DB + vendored drift + self-containment; --runtime probes LOAD_*
262
+ ./bin/m eng:check [--runtime] [--no-db] # Schema vs DB + vendored drift + self-containment; --runtime probes LOAD_*
212
263
  ./bin/m eng:setup [<motor>] [--check] # Generic: writes the motor migrations (db/migrations)
213
264
  ./bin/m eng:seed [<motor>] [--force] [--check] # Generic: loads db/seed.sql.gz; msip keeps its idempotent seed
214
265
  ./bin/m eng:msip:setup # Writes the `msip` base model migrations into the consumer
@@ -305,6 +356,8 @@ Full recipe: [doc/engines.md](../../doc/engines.md) §12; release ritual:
305
356
  - **OS:** OpenBSD/adJ (primary), Linux/Ubuntu (secondary, see `doc/ubuntu-compat.md`)
306
357
  - **pnpm:** v11 (pinned via `packageManager` and `pnpm-workspace.yaml`; v11 requires `allowBuilds` and ignores the `pnpm` field of `package.json`, see `doc/pnpm.md`)
307
358
  - **Build:** `pnpm run build`, **Tests:** `make test`
359
+ - **Release:** `make release-check` (manifests: optional deps and peers use ranges) and
360
+ `make publish PKGS="..."`; ritual in [doc/version-bump.md](../../doc/version-bump.md)
308
361
  - Rollup WASM: `npm:@rollup/wasm-node` in `pnpm-workspace.yaml`
309
362
  - RPC: `NEXT_PUBLIC_RPC_URL` or `RPC_URL` in `.env`
310
363
  - PostgreSQL credentials for tests in `tests/test-project/apps/.env.test`
@@ -314,10 +367,16 @@ Full recipe: [doc/engines.md](../../doc/engines.md) §12; release ritual:
314
367
  ```bash
315
368
  ./bin/m contract:test [--fork-url <url>] [--fork-block <N>] [--verbose]
316
369
  ./bin/m contract:compile [--solc <path>|--solc-js <soljson>|--solc-version <v>]
370
+ ./bin/m contract:typechain [--target ethers-v6] [--out-dir typechain-types]
371
+ ./bin/m contract:node [--host 127.0.0.1] [--port 8545]
372
+ ./bin/m contract:deploy --contract <Name> --network <net> [--rpc <url>] [--args '[...]']
373
+ ./bin/m contract:verify --contract <Name> --network <net> [--api-url <url>] [--dry-run]
374
+ ./bin/m contract:clean
317
375
  ./bin/m contract:checkdeploy [--json|--strict|--root <dir>|--network <name>]
318
376
  ```
319
377
  Runs Hardhat-compatible tests on OpenBSD/adJ using `@ethereumjs/vm` (EDR replacement);
320
- `contract:compile` compiles without Hardhat and `contract:checkdeploy` validates deployment addresses.
378
+ compiles, generates types, runs a local node, deploys/verifies with viem and cleans without Hardhat;
379
+ `contract:checkdeploy` validates deployment addresses.
321
380
  See [doc/edr.md](../../doc/edr.md) and [issue #7](https://gitlab.com/pasosdeJesus/m/-/issues/7).
322
381
 
323
382
  ### E2E Test Commands
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pasosdejesus/mpdj",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Extensión Pasos de Jesús para m CLI — marco cristiano, credenciales, requerimientos",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -64,7 +64,7 @@
64
64
  "REQ"
65
65
  ],
66
66
  "peerDependencies": {
67
- "@pasosdejesus/m": "^0.37.0",
67
+ "@pasosdejesus/m": "^0.37.9",
68
68
  "next": ">=15.0.0",
69
69
  "react": ">=18.0.0",
70
70
  "vitest": ">=2.1.9"