@dzhechkov/p-replicator 1.10.4 → 1.12.0

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 (68) hide show
  1. package/.dz-manifest.json +119 -47
  2. package/CHANGELOG.md +85 -0
  3. package/MULTIPLATFORM_ROADMAP.md +1 -1
  4. package/README/eng/01_quickstart.md +3 -3
  5. package/README/eng/02_user_guide.md +1 -1
  6. package/README/eng/03_admin_guide.md +2 -2
  7. package/README/eng/04_api_reference.md +11 -5
  8. package/README/eng/README.md +1 -1
  9. package/README/ru/01_quickstart.md +3 -3
  10. package/README/ru/02_user_guide.md +1 -1
  11. package/README/ru/03_admin_guide.md +2 -2
  12. package/README/ru/04_api_reference.md +11 -5
  13. package/README/ru/README.md +1 -1
  14. package/README/ru/html/index.html +7 -7
  15. package/README.md +154 -38
  16. package/bin/cli.js +0 -0
  17. package/package.json +12 -10
  18. package/sbom.json +226 -46
  19. package/scripts/check-pipeline-gaps.sh +413 -0
  20. package/src/commands/doctor.js +94 -4
  21. package/src/rule-components.json +11 -0
  22. package/src/utils.js +3 -8
  23. package/templates/.claude/agents/harvest-coordinator.md +10 -1
  24. package/templates/.claude/commands/feature.md +57 -9
  25. package/templates/.claude/commands/go.md +11 -0
  26. package/templates/.claude/commands/harvest.md +41 -3
  27. package/templates/.claude/commands/myinsights.md +21 -26
  28. package/templates/.claude/commands/replicate.md +10 -1
  29. package/templates/.claude/commands/start.md +8 -0
  30. package/templates/.claude/hooks/check-ports.cjs +409 -20
  31. package/templates/.claude/hooks/session-insights.cjs +158 -25
  32. package/templates/.claude/hooks/statusline.cjs +2 -2
  33. package/templates/.claude/hooks/write-insight.cjs +253 -0
  34. package/templates/.claude/rules/cost-of-detection-ladder.md +96 -0
  35. package/templates/.claude/rules/docker-ports.md +41 -19
  36. package/templates/.claude/rules/feature-lifecycle.md +14 -3
  37. package/templates/.claude/rules/honest-configuration.md +54 -0
  38. package/templates/.claude/rules/insights-capture.md +10 -5
  39. package/templates/.claude/rules/replicate-pipeline.md +4 -2
  40. package/templates/.claude/rules/skill-interface-protocol.md +1 -0
  41. package/templates/.claude/rules/swarm-file-evidence.md +46 -0
  42. package/templates/.claude/settings.json +13 -1
  43. package/templates/.claude/skills/knowledge-extractor/modules/01-agent-review.md +16 -5
  44. package/templates/.claude/skills/sparc-prd-mini/SKILL.md +86 -16
  45. package/tests/e2e/lifecycle.test.js +55 -9
  46. package/tests/e2e/packed-insights-writer.test.js +308 -0
  47. package/tests/fixtures/prep-traceability-fixture/docs/features/order-refund/01_specification.md +29 -0
  48. package/tests/fixtures/prep-traceability-fixture/docs/features/order-refund/02_pseudocode.md +57 -0
  49. package/tests/snapshot/baseline.json +24 -20
  50. package/tests/snapshot/templates.test.js +47 -0
  51. package/tests/unit/absence-is-not-emptiness.test.js +15 -1
  52. package/tests/unit/check-pipeline-gaps.test.js +94 -0
  53. package/tests/unit/check-ports.test.js +729 -2
  54. package/tests/unit/db-port-rule.test.js +36 -5
  55. package/tests/unit/detection-ladder-contract.test.js +302 -0
  56. package/tests/unit/detection-ladder-registry.test.js +52 -0
  57. package/tests/unit/doctor-insight-flow.test.js +315 -0
  58. package/tests/unit/external-dependency-check.test.js +19 -19
  59. package/tests/unit/honest-failure-rules.test.js +492 -0
  60. package/tests/unit/hooks-project-anchored.test.js +67 -3
  61. package/tests/unit/insights-docs-tell-the-truth.test.js +52 -31
  62. package/tests/unit/insights-dz-delegation.test.js +197 -0
  63. package/tests/unit/insights-writer.test.js +285 -0
  64. package/tests/unit/shipped-suite-context.test.js +3 -1
  65. package/tests/unit/traceability-machine-ids.test.js +413 -0
  66. package/tests/unit/traceability-negative-fixture.test.js +322 -0
  67. package/tests/unit/utils.test.js +3 -2
  68. package/LICENSE +0 -21
package/.dz-manifest.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "files": [
6
6
  {
7
7
  "path": "CHANGELOG.md",
8
- "sha256": "63092c71ea7153d562c26db68f2774f233b7c5d37e78e4e3cdfaa1546c42668d"
8
+ "sha256": "866333345d0c618caf68dac1d522b2b3f003fd97d5a0a5c91fc2b6f226137a6c"
9
9
  },
10
10
  {
11
11
  "path": "KNOWN_LIMITATIONS.md",
@@ -17,27 +17,27 @@
17
17
  },
18
18
  {
19
19
  "path": "MULTIPLATFORM_ROADMAP.md",
20
- "sha256": "a6fed19895b2c93a1be5f3416f021b2d5165449ff6dadd9bf6d96ba8c0491192"
20
+ "sha256": "59388dee254e5b292c642425c28b110ca9c8ebd260e01e935e9641fb2cff18fb"
21
21
  },
22
22
  {
23
23
  "path": "README.md",
24
- "sha256": "d65437974585200f0db8ef082dfbd0519f61cc29cadf3224732ae7a459a20186"
24
+ "sha256": "ef2ce567e7221d6732ba8c085571adb0af28bcf512e11322c242b7f44dbf8f98"
25
25
  },
26
26
  {
27
27
  "path": "README/eng/01_quickstart.md",
28
- "sha256": "8fe8dc32ddb603bfae2c71c8bafed51dd4d291a3f32942c06a049cab25dbf490"
28
+ "sha256": "eaa6082c03470f61d6b5cfd2acb180143f9f206e25a2fc81f977fc3119f58843"
29
29
  },
30
30
  {
31
31
  "path": "README/eng/02_user_guide.md",
32
- "sha256": "307cf6c2a9bd6ebee678e47c0a13c15fdaaebcfdc9a17a0a08fe7892ed1afee0"
32
+ "sha256": "33c1d4bd0fed5c33cafedc74aa702a9d16b4f93a828b9bef125811a3019c139e"
33
33
  },
34
34
  {
35
35
  "path": "README/eng/03_admin_guide.md",
36
- "sha256": "e4c5c190383570dd0f9853ec18221d0ccd24a85a4a42575e819c7b283fc42077"
36
+ "sha256": "dbcb4f7df564f749a7db8c58286f734f0b33801d85c65f9dd677921a4bae2113"
37
37
  },
38
38
  {
39
39
  "path": "README/eng/04_api_reference.md",
40
- "sha256": "0a4879f346ac965cb2011515545c3fca0d922b7b8fcb817cf74dddbb01448f01"
40
+ "sha256": "d55a2280f6619ac63303028df64b8a1fcd2d74dd66301c6c2565b4906522e966"
41
41
  },
42
42
  {
43
43
  "path": "README/eng/05_architecture.md",
@@ -53,23 +53,23 @@
53
53
  },
54
54
  {
55
55
  "path": "README/eng/README.md",
56
- "sha256": "19cddc3b70de2f8ae440d7dfcd5268cf195df32e35a0b17f861f727df76cc3ca"
56
+ "sha256": "fd8839b2c0291fabedb1273905bb9858fd01618153eaff8e3a64dbaf8772f360"
57
57
  },
58
58
  {
59
59
  "path": "README/ru/01_quickstart.md",
60
- "sha256": "3d5b2a8dd9c9f7c0f35ae7b280ed22d865086a07a5f07866ce496549d4623e9b"
60
+ "sha256": "ba8080f582a98d43c08658f5dad1856e64975603df152f9134107110bf61bc48"
61
61
  },
62
62
  {
63
63
  "path": "README/ru/02_user_guide.md",
64
- "sha256": "20b8f60be4755fcdacfb845b8bfc9f12cc26bd999fefb5f98ab6dd0a2948f1c7"
64
+ "sha256": "94059cfd16d23c3b91df018538ce827f16dc8a2fa9b659eb8a1ccb208e3aa9bc"
65
65
  },
66
66
  {
67
67
  "path": "README/ru/03_admin_guide.md",
68
- "sha256": "c7923e865819d4d544f64066a4ef9ab729266dc2e11eeaed5e736f0357fcd2e8"
68
+ "sha256": "d5aa4d481b6fd34abfc2b6a0f6d4beffa26c25bfa46f943d40609eaf9616fb47"
69
69
  },
70
70
  {
71
71
  "path": "README/ru/04_api_reference.md",
72
- "sha256": "6921d471039d970f132f2b451d5ae147f38e8064479a0774cd706a633fd4b527"
72
+ "sha256": "09064d2c3726b6121bd3a9885129b305c2ef1c973b216be3c64db732a5cb7bff"
73
73
  },
74
74
  {
75
75
  "path": "README/ru/05_architecture.md",
@@ -85,7 +85,7 @@
85
85
  },
86
86
  {
87
87
  "path": "README/ru/README.md",
88
- "sha256": "b98cda9099c19497ddcdc1b58d17d62a75ef73cf6c6e64beac723b0e0363b661"
88
+ "sha256": "c44296a2696af4055081297affb18c2669c3f982a8e52c85f9dbe9de6e607147"
89
89
  },
90
90
  {
91
91
  "path": "README/ru/html/build.js",
@@ -93,7 +93,7 @@
93
93
  },
94
94
  {
95
95
  "path": "README/ru/html/index.html",
96
- "sha256": "31baddce9668e9802bc042c8a0df326061c1db7662f64df6861f7ed419890b88"
96
+ "sha256": "2833632ec01f00e0524048d859f8265b3c7dc059e74e0c5112939e3f91e7c874"
97
97
  },
98
98
  {
99
99
  "path": "README/ru/html/script.js",
@@ -109,7 +109,11 @@
109
109
  },
110
110
  {
111
111
  "path": "package.json",
112
- "sha256": "f3741d83e7bb92a60d95f7fcefb5a601e15e3b8cc01d9d7d887c88b2d9a79532"
112
+ "sha256": "d2e2977cfcea59cf56bb7bf3ad1cf6b52262e71000a65dc0865cd8cfc4761e46"
113
+ },
114
+ {
115
+ "path": "scripts/check-pipeline-gaps.sh",
116
+ "sha256": "349dbc45876cd5765ae48ff2224ab7f96d5df01a0d86361866b7740ed3cf4de0"
113
117
  },
114
118
  {
115
119
  "path": "src/cli.js",
@@ -117,7 +121,7 @@
117
121
  },
118
122
  {
119
123
  "path": "src/commands/doctor.js",
120
- "sha256": "566a8cf554420fbbb734705de283f04d40048ee3eb38f1877304d2cc5e56a47f"
124
+ "sha256": "e8f985c2cbfa1bb151bf705261c45e5609215d22b047a0b94d1e2e9108b41918"
121
125
  },
122
126
  {
123
127
  "path": "src/commands/init.js",
@@ -139,9 +143,13 @@
139
143
  "path": "src/commands/verify.js",
140
144
  "sha256": "18f5442af9b3a549dfb284cd0d8aef83ba973bd34a3a04e7c656262baebb0e57"
141
145
  },
146
+ {
147
+ "path": "src/rule-components.json",
148
+ "sha256": "9508acdf6b2324c75024f1beb4e7c9542d2876bd2afb737b549dec65c6d56e4d"
149
+ },
142
150
  {
143
151
  "path": "src/utils.js",
144
- "sha256": "43f6abbf447478bae423bce742cfbdace1725946621925eb2ffb3a3ab5b3379e"
152
+ "sha256": "553a343104da5f2366ea5879fd6140aaee5035924d9d567c519450d0324660c5"
145
153
  },
146
154
  {
147
155
  "path": "templates/.claude/agents/doc-validator.md",
@@ -149,7 +157,7 @@
149
157
  },
150
158
  {
151
159
  "path": "templates/.claude/agents/harvest-coordinator.md",
152
- "sha256": "70fa884057669902e18744915305705cf9e45e738a83d7bb5ab011a3b72d683c"
160
+ "sha256": "71e524e8379df46bbf457dbc1d4480634e05c99b7d3a4f59a356b8d71a0a4166"
153
161
  },
154
162
  {
155
163
  "path": "templates/.claude/agents/product-discoverer.md",
@@ -169,19 +177,19 @@
169
177
  },
170
178
  {
171
179
  "path": "templates/.claude/commands/feature.md",
172
- "sha256": "3b605c004ae6d794dee30892956dc0a9536195e828929bdaff134f3e952e87bb"
180
+ "sha256": "2df6ab3e6c015dc294955234192843c24a00e07784ac30994c7fe7572f8de775"
173
181
  },
174
182
  {
175
183
  "path": "templates/.claude/commands/go.md",
176
- "sha256": "655dc9cad37b61a9f283cef15e435c492ee7cbc88a6ce59295ac32c975dee858"
184
+ "sha256": "df92c2ec060707638cc7d26d9c9e6a5fecc381e89915bdb0671c5489fb530574"
177
185
  },
178
186
  {
179
187
  "path": "templates/.claude/commands/harvest.md",
180
- "sha256": "c074fe7799f594dda44c5f8166da707f25cee51b12f758dea562a8c1e6ac5dcd"
188
+ "sha256": "5d78e189947b8c91602de89742099f25df4c85f5625299bd77bc073af667e155"
181
189
  },
182
190
  {
183
191
  "path": "templates/.claude/commands/myinsights.md",
184
- "sha256": "93258a3340f99a0f14b374746ae2934b01d7cefe06d575434868eb98da2d854a"
192
+ "sha256": "f31c5e133b5027197359e4179cbba1ab535f990634a69ea7c5c73bd2bc329d68"
185
193
  },
186
194
  {
187
195
  "path": "templates/.claude/commands/next.md",
@@ -193,7 +201,7 @@
193
201
  },
194
202
  {
195
203
  "path": "templates/.claude/commands/replicate.md",
196
- "sha256": "8862d0dc117815b1c3fc7f6e929996e2458783f1ac443eb70bc2a7ebe63a67c3"
204
+ "sha256": "7dbf352a122f415bb987d3c968b905d5a9bda932e619382ce24f9ef2c099723a"
197
205
  },
198
206
  {
199
207
  "path": "templates/.claude/commands/run.md",
@@ -201,7 +209,7 @@
201
209
  },
202
210
  {
203
211
  "path": "templates/.claude/commands/start.md",
204
- "sha256": "4aaebc10ca8d607d4b2b43883d82392e9788c2f183878a49fc0d1ed54d07ee95"
212
+ "sha256": "2c9d2bd450d6a8cd6f8f0e958b77ae4430efc745645a11300cf29e85dcb468a6"
205
213
  },
206
214
  {
207
215
  "path": "templates/.claude/hooks/autocommit-insights.cjs",
@@ -225,11 +233,11 @@
225
233
  },
226
234
  {
227
235
  "path": "templates/.claude/hooks/check-ports.cjs",
228
- "sha256": "1813aa60e4d15c5f6ce54a9b3471c3772efe60c332316183c7ad8f5b619f2169"
236
+ "sha256": "2385687994c882ebb430cdf8ae2bef9309fe5ba284354671413dc134f8e17694"
229
237
  },
230
238
  {
231
239
  "path": "templates/.claude/hooks/session-insights.cjs",
232
- "sha256": "46f8357e3886a6d54db1ab4af969b9b8643ae5937ba59038a5651ffbcfd0d30e"
240
+ "sha256": "31fbe90d81b01dfb56557ed5d68dbde2211a14d5469c5d3761f45fb63c07c3a7"
233
241
  },
234
242
  {
235
243
  "path": "templates/.claude/hooks/state-update.cjs",
@@ -237,35 +245,51 @@
237
245
  },
238
246
  {
239
247
  "path": "templates/.claude/hooks/statusline.cjs",
240
- "sha256": "465190ab21610357094fd6eba188ba9f7086dc5a933568f40a7f7c715ccd6745"
248
+ "sha256": "5a842162e710b6cb07f59ee0711f2b190d5e505e4546ea01931ba4ba25be8228"
249
+ },
250
+ {
251
+ "path": "templates/.claude/hooks/write-insight.cjs",
252
+ "sha256": "743f2d85b037cf522dfaf4775947b0cd331e52f2f304e88360c160e0e8e9a589"
253
+ },
254
+ {
255
+ "path": "templates/.claude/rules/cost-of-detection-ladder.md",
256
+ "sha256": "f15309ee8f1494478ff7678380dbe8fc8eecd154be36d57c9090cd17126a07da"
241
257
  },
242
258
  {
243
259
  "path": "templates/.claude/rules/docker-ports.md",
244
- "sha256": "bef41c25c875479341f68783c2d64572800d4710f55401e55519245f03d22efb"
260
+ "sha256": "59eb430f29dd762e8b76ad6d1177fe8b5b250de007856c743387cb88ee157942"
245
261
  },
246
262
  {
247
263
  "path": "templates/.claude/rules/feature-lifecycle.md",
248
- "sha256": "f9ddc8c889ab7938a7207b36ae46c36be05e9b870956ef16617bf31b2f78c758"
264
+ "sha256": "4a7bb631bc3600c8aeb5a5a484258298688d87604ac5d2d3cacdff9139d05edc"
249
265
  },
250
266
  {
251
267
  "path": "templates/.claude/rules/git-workflow.md",
252
268
  "sha256": "7d8d2ded47fcc0fb95da3dc226efa6cb3c80d6adf7296977588c181dfce20192"
253
269
  },
270
+ {
271
+ "path": "templates/.claude/rules/honest-configuration.md",
272
+ "sha256": "851bc28e9e2baf1043bc09b982f3df3431bc7af1e076f8ff9df3d6729835bad5"
273
+ },
254
274
  {
255
275
  "path": "templates/.claude/rules/insights-capture.md",
256
- "sha256": "488d694caffe7a32915b0ec1beb7a84b223fe602722c5bb91ab8bf2785626387"
276
+ "sha256": "d529e6be79178636ca362d83366b1dd7a843371e8ba4f2b09d65c009fab52dc4"
257
277
  },
258
278
  {
259
279
  "path": "templates/.claude/rules/replicate-pipeline.md",
260
- "sha256": "99289f711c34cfddddbef5328b74749fc63d1f74636c6a4e4d61caa202fad05d"
280
+ "sha256": "fce6480a56bd4ab2d6908faac5985d7557527b1ca36ad597bb00feabca3688bd"
261
281
  },
262
282
  {
263
283
  "path": "templates/.claude/rules/skill-interface-protocol.md",
264
- "sha256": "7669309b0ae4330bc6cf6b26bd9cfc01d7b99a8e70c1f056a52574430db9378e"
284
+ "sha256": "c3f624d0a8a4c7e0f5744e529eb4486cc0589fdb732b9799bccc75091a6d63ca"
285
+ },
286
+ {
287
+ "path": "templates/.claude/rules/swarm-file-evidence.md",
288
+ "sha256": "c71a216dbc3fd633c30949823ceac354f8439b96279a1a8dd606afb1b3ef5c45"
265
289
  },
266
290
  {
267
291
  "path": "templates/.claude/settings.json",
268
- "sha256": "b1df6cf834ccfa227f3318a70862115c17838ab31253e9d8d89381b7763e61fd"
292
+ "sha256": "18db09827dce410667b93e2b1a41ef8e46d4431114733e4304a5fc2192b2fc66"
269
293
  },
270
294
  {
271
295
  "path": "templates/.claude/skills/brutal-honesty-review/README.md",
@@ -521,7 +545,7 @@
521
545
  },
522
546
  {
523
547
  "path": "templates/.claude/skills/knowledge-extractor/modules/01-agent-review.md",
524
- "sha256": "53883f182c26c710190399a23193cddb4a94b0f35bb42169a353f354aae4083a"
548
+ "sha256": "33395c8b87c4d7d1f63dff0891aaebcf50e302cbe2026005b3c6d51817f35a70"
525
549
  },
526
550
  {
527
551
  "path": "templates/.claude/skills/knowledge-extractor/modules/02-classify.md",
@@ -681,7 +705,7 @@
681
705
  },
682
706
  {
683
707
  "path": "templates/.claude/skills/sparc-prd-mini/SKILL.md",
684
- "sha256": "71f97e269e8b1807550a4ef91b2f0ac4dd892a074781504890d33db8f32685d2"
708
+ "sha256": "29c74d628f86f79fe2ba7b4d2a69b34de332519b8a11c945568e59830535742a"
685
709
  },
686
710
  {
687
711
  "path": "templates/.claude/skills/sparc-prd-mini/references/sparc-methodology.md",
@@ -697,15 +721,27 @@
697
721
  },
698
722
  {
699
723
  "path": "tests/e2e/lifecycle.test.js",
700
- "sha256": "fd4af066e9e20c7c0f711337f3afdfd2f8e13ec8c845f8784befeb0785270e14"
724
+ "sha256": "4c51f9c38396b115a875f397168b82c50312c2b93436b32ae501ac3bd0978fc9"
725
+ },
726
+ {
727
+ "path": "tests/e2e/packed-insights-writer.test.js",
728
+ "sha256": "3477f63db3f531e3c2970b85d784f22d268695030764319457a543b2e9d49758"
729
+ },
730
+ {
731
+ "path": "tests/fixtures/prep-traceability-fixture/docs/features/order-refund/01_specification.md",
732
+ "sha256": "86e366e17ff16f7dbe161bdd1bf3351212e6bb2bac7a5d2c20616fb9c6fd454a"
733
+ },
734
+ {
735
+ "path": "tests/fixtures/prep-traceability-fixture/docs/features/order-refund/02_pseudocode.md",
736
+ "sha256": "848b3afb83e2d4151c1774900b33983b824e88c03e651085c4a9a1952ba78e64"
701
737
  },
702
738
  {
703
739
  "path": "tests/snapshot/baseline.json",
704
- "sha256": "8215cb40b13954c4d651c28d2ee6f6a7a1d39fd3ff5bf8b0d31cdfb1970c3b37"
740
+ "sha256": "a5a8123c4fdc9297b44cd521c87ce8dd46caaafcd849a237c0224d3ec52facce"
705
741
  },
706
742
  {
707
743
  "path": "tests/snapshot/templates.test.js",
708
- "sha256": "7a262bd459982aa9c2cbd9abd471ae05eca5fa1794e0ee30660164c17294ab59"
744
+ "sha256": "79b4d3d48a5d132af19f4a25ee6efb4e9907cbed4ca21e6102a29346e719321f"
709
745
  },
710
746
  {
711
747
  "path": "tests/snapshot/update-baseline.js",
@@ -713,7 +749,7 @@
713
749
  },
714
750
  {
715
751
  "path": "tests/unit/absence-is-not-emptiness.test.js",
716
- "sha256": "6c7c1c8086461eac16415ebcccea081d3169212826f23e835cf109d741dd6ac3"
752
+ "sha256": "db7d0531dfb1a355c51bf867e156397723b7f3ea48dd8831880f8ed3a945e65b"
717
753
  },
718
754
  {
719
755
  "path": "tests/unit/adr-decision-coverage.test.js",
@@ -739,21 +775,37 @@
739
775
  "path": "tests/unit/check-growth-trace.test.js",
740
776
  "sha256": "733d87fe8eca897fcfc5cad9342d4db2085270c21d0d8866d817a9b9418511c2"
741
777
  },
778
+ {
779
+ "path": "tests/unit/check-pipeline-gaps.test.js",
780
+ "sha256": "88bd501cf7716dec34435c6265033d6819ca30b65f8bbd3a991c984557fe139f"
781
+ },
742
782
  {
743
783
  "path": "tests/unit/check-ports.test.js",
744
- "sha256": "d8e2e1f22dadb40fbb03ffbd25ed945fa85fe7b5d49fe0f3597cfc3facc2c118"
784
+ "sha256": "3d927f6bece5bcf163f9fbbc599d77d74dd51fb0f2978e7f0b1dfe3a086a76c6"
745
785
  },
746
786
  {
747
787
  "path": "tests/unit/db-port-rule.test.js",
748
- "sha256": "a97c913ccba8da16f7b8ef3094cac4ba8b499df2d644b3094c58945306d98c09"
788
+ "sha256": "9c652a4453b5812a3e8e021193a45a5e08571ba483b0b82cc80138fada4816a3"
749
789
  },
750
790
  {
751
791
  "path": "tests/unit/detect-parse-anchor.test.js",
752
792
  "sha256": "ecfa57bfcb34e12081009d0bdf4be83a6eab7a8b7a6a0dc27c1cb02ae5561be0"
753
793
  },
794
+ {
795
+ "path": "tests/unit/detection-ladder-contract.test.js",
796
+ "sha256": "8ff509273436f10432bed8d34568d88d3bcbf6d85c9e7e290310ab771b9785b0"
797
+ },
798
+ {
799
+ "path": "tests/unit/detection-ladder-registry.test.js",
800
+ "sha256": "22383f72a1d629e2bdfb3649350237751012cf9edc289af058d44f7a64d56a29"
801
+ },
802
+ {
803
+ "path": "tests/unit/doctor-insight-flow.test.js",
804
+ "sha256": "80da9e5aee65413d9cf72c49ee25d370c2a5a36ceebf1e061210cb7d22ce7219"
805
+ },
754
806
  {
755
807
  "path": "tests/unit/external-dependency-check.test.js",
756
- "sha256": "d85109f8e86648d61fc17d0128e9d4881950a70641c246e667d7e54ffc1f0273"
808
+ "sha256": "37bcea52089d32a6a33fc5155f487be0b20dd050a63216af899e2562a786c7ba"
757
809
  },
758
810
  {
759
811
  "path": "tests/unit/generated-guard-templates.test.js",
@@ -779,9 +831,13 @@
779
831
  "path": "tests/unit/guard-forms.test.js",
780
832
  "sha256": "61a219a7748e0b56bc4207eee107815a4b4111fbebd41b68f6d390130506cd42"
781
833
  },
834
+ {
835
+ "path": "tests/unit/honest-failure-rules.test.js",
836
+ "sha256": "22ad3d2196049fafbb549688c2506fd1883d592a1e563a93f8ffbf078c4c1891"
837
+ },
782
838
  {
783
839
  "path": "tests/unit/hooks-project-anchored.test.js",
784
- "sha256": "2fa5b44982d72701d7a8486ac24ee3a91c6fa6123ef7303a0e065bf1e60987d7"
840
+ "sha256": "c7b8e757190e1f88132f660394447d691a7915b77babb385b15ae5af7f94bb67"
785
841
  },
786
842
  {
787
843
  "path": "tests/unit/hooks-report-failures.test.js",
@@ -789,7 +845,15 @@
789
845
  },
790
846
  {
791
847
  "path": "tests/unit/insights-docs-tell-the-truth.test.js",
792
- "sha256": "d73ebce2f729911cad452897883b3d55d69e19613c7c1fc7c9bcfa3b5569fc1b"
848
+ "sha256": "b49143cc5c179b419c6aa2349b5a93824652ba89004bc8f026240293febe33fc"
849
+ },
850
+ {
851
+ "path": "tests/unit/insights-dz-delegation.test.js",
852
+ "sha256": "4d0943a66ffbbed3dfd1c44cc5d1165d8d9879bae59094cea052ea1d5af77bc2"
853
+ },
854
+ {
855
+ "path": "tests/unit/insights-writer.test.js",
856
+ "sha256": "e723a1fe9cd392196aae4f0c421915b6487f78ee213cfa1eab3f1b66106ec243"
793
857
  },
794
858
  {
795
859
  "path": "tests/unit/module-copy-identity.test.js",
@@ -805,7 +869,7 @@
805
869
  },
806
870
  {
807
871
  "path": "tests/unit/shipped-suite-context.test.js",
808
- "sha256": "fd6128505f3272aa7349d21d18a2494eaa8e5e2397ee85047f9828471c99d721"
872
+ "sha256": "181aefbb2e9c867471f62ce87989434f359ab58c5400f49fa6b3b10c1eb40583"
809
873
  },
810
874
  {
811
875
  "path": "tests/unit/skill-paths-prebaked.test.js",
@@ -831,9 +895,17 @@
831
895
  "path": "tests/unit/sync-templates-guard.test.js",
832
896
  "sha256": "e4fc7687dcf37d17bf2a059d3248c8c00526c104f6a0f6e104fa9ca6e00039ae"
833
897
  },
898
+ {
899
+ "path": "tests/unit/traceability-machine-ids.test.js",
900
+ "sha256": "8160e026f485c43fb747b0089abe6c1e0f5bdd03223c3b7990e478c3aa386a5b"
901
+ },
902
+ {
903
+ "path": "tests/unit/traceability-negative-fixture.test.js",
904
+ "sha256": "abc54e0e00138ecc6d75e0cbc496cbd888cd97b1ed567b7d23557f0674b5c161"
905
+ },
834
906
  {
835
907
  "path": "tests/unit/utils.test.js",
836
- "sha256": "2ccc68f9a91d188d56ebad77c4a64653cc5ff7aec093a739eb707774a37e1732"
908
+ "sha256": "81ee9906aecc8419553a28c410883854a2009de9109ef1ffaafa2ea53b1ec2c7"
837
909
  },
838
910
  {
839
911
  "path": "tests/unit/validation-gate-teeth.test.js",
@@ -841,5 +913,5 @@
841
913
  }
842
914
  ]
843
915
  },
844
- "signature": "59EM4oLsL+Y97yXQ1+vTn2b5G6UNGUSnzk9Uqk38ehEewsQbKCX7nXmhtxKyG/ahnpXHzTKSCysf0qE3E+OFAA=="
916
+ "signature": "v5SdpgSuqVtv8AuAucBYVzJVG2LOXwFCUpKkdpto/9hkjjU84KTM+4UaJm1O/qaEeuIRPSY3uDLEmQoUxHskDA=="
845
917
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,91 @@ All notable changes to `@dzhechkov/p-replicator` are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ _Nothing yet._
11
+
12
+ ## [1.12.0] - 2026-08-31
13
+
14
+ **MINOR — the pre-shipped rule contract moves from seven rules to nine, and the port check gains a
15
+ second, deliberately chosen scope.**
16
+
17
+ Note for anyone upgrading from 1.10.4: `1.11.0` was prepared but never published, so this release
18
+ carries its ladder work as well. Read both entries.
19
+
20
+ ### Added
21
+
22
+ - `check-ports.cjs --machine`: a second scope that inventories the running containers of the current
23
+ Docker context, recognizes storage through the shared image taxonomy, attributes Compose ownership
24
+ from labels, and probes Redis auth live. The rule always stated a MACHINE invariant while the check
25
+ answered for one DIRECTORY — a green receipt was reported on a host where three neighbouring
26
+ databases sat on `0.0.0.0` and a Redis ran with no password at all. Catalog mode never queries the
27
+ runtime; the loopback exception stays, and revoking it would be a separate decision.
28
+ - `swarm-file-evidence` rule: every parallel work unit has a named file result. A narrative reply is
29
+ only a pointer, silence is neither progress nor completion, and a status of `running` beside a dead
30
+ recorded PID closes the unit as failed rather than reporting work from silence.
31
+ - `honest-configuration` rule: a value governing external output, access, limits, routing, or an
32
+ authoritative measurement must not become plausible or permissive when its meaning is absent or
33
+ unproven. `undefined` stays distinct from `''`, the allowlist lives in code while the environment
34
+ only selects from it, and `0/0` renders unavailable rather than `0%`.
35
+ - The packaged `write-insight.cjs` boundary is the required final persistence gate for quick and full
36
+ `/harvest` runs carrying a candidate. Its structured-stdin contract lazily creates the Markdown
37
+ carrier, preserves prior bytes on append, and returns `duplicate` for an exact normalized replay.
38
+ Runtime behaviour has no `dz` dependency. Until this landed, `/harvest` had no writer at all: a
39
+ field project ran three days and 69 commits with 19 fixes and zero insights recorded, every
40
+ surface green.
41
+ - Exact-artifact acceptance installs `npm pack` output into a fresh consumer and exercises
42
+ absent → create → append → replay → delete → doctor → recreate without checkout substitution.
43
+ - Targeted mutation defenses for receipt enforcement, first-write creation, exact-repeat idempotence
44
+ and missing-carrier visibility.
45
+ - `doctor` reports the insight FLOW: fix commits against insight records for a named period. It is
46
+ informational by construction — a low ratio can equally mean the work went smoothly — and it never
47
+ changes doctor's exit code.
48
+
49
+ ### Changed
50
+
51
+ - The SessionStart insight hook now prints `инсайтов пока нет; /myinsights создаст первую запись`
52
+ when the carrier is absent, while remaining exit-zero and non-mutating; empty and read-error states
53
+ stay distinct from that ordinary missing branch. The hook's silence was the named cause of the
54
+ three-day invisibility above.
55
+ - The pre-shipped hook/utility contract grows from 9 to 10.
56
+ - Insight delivery delegates to `dz` only when recall is genuinely ARMED. `command -v dz` is not the
57
+ condition: local output is suppressed only after a successful, non-empty recall carrying
58
+ `--domain p-replicator-insights`. Absent, failing, and empty recall each fall back to local output,
59
+ and a failure is named rather than swallowed. Markdown remains the source of truth throughout.
60
+ - `docker-ports.md` now names EXPOSURE as the consequence of a miss instead of port conflicts, and
61
+ explains that the left-hand side of `${DB_PORT:-11432}:5432` says nothing about the publish
62
+ address — the address is the third element, defaulting to all interfaces.
63
+
64
+ ### Honest limits
65
+
66
+ - An unreadable state — no git, not a repository, an unreadable carrier, a config that cannot be
67
+ parsed — renders as NOT PERFORMED with its reason named, never as a measured zero. A check that
68
+ answers "clean" about a state it could not read is worse than no check.
69
+ - `--machine` is a snapshot of the current Docker context at the moment it is invoked. It is not
70
+ continuous monitoring, and it says nothing about stopped containers or another context.
71
+ - The flow check counts; it does not judge whether the captured insights are worth anything.
72
+
73
+ ## [1.11.0] - 2026-08-30
74
+
75
+ **MINOR — the pre-shipped consumer rule contract moves from six rules to seven.**
76
+
77
+ ### Added
78
+
79
+ - Added the consumer-local `cost-of-detection-ladder` rule: five enforcement layers, signal-fit
80
+ check selection, and an owned reaction for every violation.
81
+ - Registered and shipped the ladder as the seventh rule required by `init`, `doctor`, and `verify`,
82
+ with link-backs from the two ADR-named quality-gate rules.
83
+
84
+ ### Fixed
85
+
86
+ - Made the backlink contract ignore the ladder link itself when detecting prose allusions, so
87
+ removing either required link now makes the focused gate fail.
88
+ - Replaced the distribution tautology with an assertion over the actual `npm pack --dry-run --json`
89
+ file listing.
90
+ - Added a mutation-gate case for removing the seventh-rule requirement, restored the count scanner's
91
+ cross-line reach, and aligned the signed manifest with the files npm actually packs.
92
+
8
93
  ## [1.10.0] - 2026-08-27
9
94
 
10
95
  **Every guard in this package can now be shown to fail — and three that could not, now can.**
@@ -112,7 +112,7 @@ Beyond Level 2 — adapt logic for platform-specific capabilities:
112
112
  | `/myinsights`, `/docs`, `/harvest`, `/start`, `/deploy` | ✅ universal | path-translate | **Yes** |
113
113
  | 10 skills (sparc-prd-mini, etc.) | ⚠️ Claude-specific composition | inline-compile into commands | **Compromise** — sacrifice runtime-loading |
114
114
  | 4 pre-shipped agents | ⚠️ Claude Task-tool specific | translate to platform sub-agents | **Yes if platform supports** |
115
- | 6 rules | ✅ universal markdown | path-translate | **Yes** |
115
+ | 9 rules | ✅ universal markdown | path-translate | **Yes** |
116
116
  | Hooks (SessionStart insights, Stop autocommit) | ❌ Claude-only | bake into commands as instructions | **Compromise** — degraded UX |
117
117
  | Statusline dashboard | ❌ Claude-only | optional `progress.md` file? | **Skip** — Claude-exclusive feature |
118
118
  | `verify` CLI command | ✅ universal | works as-is | **Yes** (already works) |
@@ -22,7 +22,7 @@ This creates:
22
22
  - `.claude/skills/` — 10 pre-shipped skills
23
23
  - `.claude/commands/` — 11 slash commands (`/replicate`, `/run`, `/feature`, ...)
24
24
  - `.claude/agents/` — 4 pipeline agents
25
- - `.claude/rules/` — 5 governance rules
25
+ - `.claude/rules/` — 9 governance rules
26
26
  - `.claude/hooks/` — 6 cross-platform Node scripts
27
27
  - `.claude/settings.json` — hooks + statusline configuration
28
28
  - `.p-replicator.json` — install manifest
@@ -162,7 +162,7 @@ npx @dzhechkov/p-replicator verify
162
162
 
163
163
  The command checks:
164
164
 
165
- - **Pre-shipped contract** (must-have): 10 skills + 11 commands + 4 agents + 6 rules + settings.json
165
+ - **Pre-shipped contract** (must-have): 10 skills + 11 commands + 4 agents + 9 rules + settings.json
166
166
  - **Post-/replicate hints** (advisory): CLAUDE.md, project-specific agents,
167
167
  feature-roadmap.json, security rules, etc.
168
168
 
@@ -225,7 +225,7 @@ your-project/
225
225
  │ ├── skills/ # 10 skills
226
226
  │ ├── commands/ # 11 slash commands
227
227
  │ ├── agents/ # 4 pipeline agents
228
- │ ├── rules/ # 6 rules
228
+ │ ├── rules/ # 9 rules
229
229
  │ ├── hooks/ # 6 Node scripts
230
230
  │ └── settings.json # hooks + statusline config
231
231
  ├── .p-replicator.json # install manifest
@@ -501,7 +501,7 @@ npx @dzhechkov/p-replicator verify
501
501
  ```
502
502
 
503
503
  Should report:
504
- - ✅ Pre-shipped contract intact (10 skills + 11 commands + 4 agents + 6 rules + settings.json)
504
+ - ✅ Pre-shipped contract intact (10 skills + 11 commands + 4 agents + 9 rules + settings.json)
505
505
  - ✅ Post-/replicate hints — many will be absent in Mode 2 (this is normal)
506
506
  - 📊 Per-feature artifacts: `docs/features/<id>/01_specification.md`...`05_completion.md`,
507
507
  `validation-report.md`, `review-report.md`
@@ -83,7 +83,7 @@ P-Replicator V1.5.0 ● user │ Sonnet 4.7
83
83
  🚀 Pipeline /<cmd> ▓▓▓░░░░ 50% │ Phase: VALIDATE (2/4) │ Last: /replicate
84
84
  🎯 Roadmap [●●●○○○○○] mvp 3/8 │ Done 5/12 │ ▶ auth-jwt │ Domain: banking
85
85
  📊 SPARC ●11/11 │ 🟢 78/100 │ Plans ●3 │ ADRs ●2 │ Harvest 2026-05-05
86
- 🛠️ Toolkit Skills ●10/10 │ Cmds ●11/11 │ Agents ●4+3 │ Rules ●6+2 │ Hooks ●7/7
86
+ 🛠️ Toolkit Skills ●10/10 │ Cmds ●11/11 │ Agents ●4+3 │ Rules ●9+2 │ Hooks ●7/7
87
87
  💡 Insights ●12 (2026-05-06) │ Tests 85/85 ✓ │ MCP ●1/1 │ Settings ✓ │ 🧬 Keysarium ✓
88
88
  ```
89
89
 
@@ -245,7 +245,7 @@ from PRD MVP scope, or by hand).
245
245
 
246
246
  | Tool | Checks | When |
247
247
  |---|---|---|
248
- | `npx @dzhechkov/p-replicator doctor` | Pre-shipped contract: 10 skills + 11 commands + 4 agents + 6 rules + settings.json + 7 hooks + git on PATH | After init / when something seems broken |
248
+ | `npx @dzhechkov/p-replicator doctor` | Pre-shipped contract: 10 skills + 11 commands + 4 agents + 9 rules + settings.json + 7 hooks + git on PATH | After init / when something seems broken |
249
249
  | `npx @dzhechkov/p-replicator verify` | Pre-shipped + post-/replicate hints (CLAUDE.md, planner.md, security.md, feature-roadmap.json, etc.) | After every `/replicate` to confirm |
250
250
 
251
251
  **`doctor` exit codes:**
@@ -51,7 +51,7 @@ Formal reference: CLI commands, flags, JSON schemas.
51
51
  ],
52
52
  "shippedDefaults": {
53
53
  "settings.json": {
54
- "hooks": { "SessionStart": [...], "Stop": [...] },
54
+ "hooks": { "SessionStart": [...], "UserPromptSubmit": [...], "Stop": [...] },
55
55
  "statusLine": { "type": "command", "command": "..." }
56
56
  }
57
57
  }
@@ -176,6 +176,7 @@ node .claude/hooks/state-update.cjs --json '{"currentCommand":"/run", ...}'
176
176
  },
177
177
  "hooks": {
178
178
  "SessionStart": [ /* matchers + hooks */ ],
179
+ "UserPromptSubmit": [ /* matchers + hooks */ ],
179
180
  "Stop": [ /* matchers + hooks */ ],
180
181
  "PreToolUse": [ /* user-added */ ],
181
182
  "PostToolUse": [ /* user-added */ ]
@@ -216,6 +217,7 @@ Each entry:
216
217
 
217
218
  **Event types in Claude Code:**
218
219
  - `SessionStart` — at session start (stdout injected into context)
220
+ - `UserPromptSubmit` — after the real user prompt is available (structured context injection)
219
221
  - `Stop` — at turn end (side-effects: commit, log)
220
222
  - `PreToolUse`, `PostToolUse` — around tool calls
221
223
 
@@ -268,10 +270,14 @@ Used by `verify`, `doctor`, `list` for uniform path resolution.
268
270
 
269
271
  ### `session-insights.cjs`
270
272
 
271
- **Trigger:** `SessionStart` hook.
272
- **Reads:** `.claude/insights/index.md` (`## YYYY-MM-DD` headings)
273
- **Writes:** stdout (Claude Code injects into session context)
274
- **Output:** up to 3 recent insights as `## Recent project insights\n\n## ... ## ... ## ...`
273
+ **Trigger:** `SessionStart` and `UserPromptSubmit` hooks.
274
+ **Reads:** the Markdown source of truth at `.claude/insights/index.md`; prompt-time delivery also
275
+ invokes optional `dz recall` with the project root pinned.
276
+ **Writes:** the missing-carrier hint at SessionStart, or one UserPromptSubmit context envelope.
277
+ **Output:** only a successful, non-empty dz recall result suppresses local output. Absent, failing,
278
+ or empty recall uses the local fallback of up to 3 recent Markdown entries; failure is named and the
279
+ other two states are quiet. The writer establishes Markdown first and only then attempts a
280
+ best-effort, idempotent `dz teach` duplicate, so projection failure cannot erase the record.
275
281
 
276
282
  ### `autocommit-roadmap.cjs` / `autocommit-insights.cjs` / `autocommit-plans.cjs`
277
283
 
@@ -6,7 +6,7 @@ product development in Claude Code (Vibe Coding).
6
6
  ## What it is
7
7
 
8
8
  `p-replicator` installs a ready-made `.claude/` toolkit into any project:
9
- **11 slash commands**, **10 skills**, **4 agents**, **6 rules**, **7 hook
9
+ **11 slash commands**, **10 skills**, **4 agents**, **9 rules**, **7 hook
10
10
  scripts**, and a `settings.json` with pre-configured hooks. The flagship
11
11
  `/replicate` command takes a project through a 5-phase pipeline (Discovery →
12
12
  Planning → Validation → Toolkit Generation → Finalize), generating SPARC
@@ -22,7 +22,7 @@ npx @dzhechkov/p-replicator init
22
22
  - `.claude/skills/` — 10 предустановленных skills
23
23
  - `.claude/commands/` — 11 slash-команд (`/replicate`, `/run`, `/feature`, ...)
24
24
  - `.claude/agents/` — 4 пайплайн-агента
25
- - `.claude/rules/` — 5 governance-правил
25
+ - `.claude/rules/` — 9 governance-правил
26
26
  - `.claude/hooks/` — 6 cross-platform Node-скриптов
27
27
  - `.claude/settings.json` — конфигурация hooks + statusline
28
28
  - `.p-replicator.json` — манифест установки
@@ -162,7 +162,7 @@ npx @dzhechkov/p-replicator verify
162
162
 
163
163
  Команда проверит:
164
164
 
165
- - **Pre-shipped contract** (must-have): 10 skills + 11 commands + 4 agents + 6 rules + settings.json
165
+ - **Pre-shipped contract** (must-have): 10 skills + 11 commands + 4 agents + 9 rules + settings.json
166
166
  - **Post-/replicate hints** (advisory): CLAUDE.md, project-specific агенты,
167
167
  feature-roadmap.json, security-правила и т.д.
168
168
 
@@ -225,7 +225,7 @@ npx @dzhechkov/p-replicator doctor
225
225
  │ ├── skills/ # 10 skills
226
226
  │ ├── commands/ # 11 slash-команд
227
227
  │ ├── agents/ # 4 pipeline-агента
228
- │ ├── rules/ # 6 правил
228
+ │ ├── rules/ # 9 правил
229
229
  │ ├── hooks/ # 6 Node-скриптов
230
230
  │ └── settings.json # hooks + statusline config
231
231
  ├── .p-replicator.json # манифест установки