This is not a complete answer but it is also too long to add as a comment! Known results concerning similar questions as yours suggest that the nilpotency class of the whole group is a function depending on both the number of generators of the whole group as well as the prime p. For example there is a group of exponent 5 in which every 2-generated subgroup is nilpotent of class at most 6 and every 3-generator subgroup is of nilpotent class at most 8 and for m>3, every m-generated subgroup is of nilpotent class at most 2m. see the following Newman, M. F. (5-ANUM); Vaughan-Lee, Michael (4-OXCH) Engel-4 groups of exponent 5. II. Orders. Proc. London Math. Soc. (3) 79 (1999), no. 2, 283–317. Of course you are asking of the nilpotency class of a finite p-group in which every 3-generator (2-generator) subgroup is at most p-1, so the above example does not apparently answer your question. The case 2-generator has been studied extensively but not for the nilpotency p-1 as you mentioned. The case p=2 implies the abelian and p=3 implies the nilpotency class 3 (as the group will be 2-Engel). The first non-trivial case is p=5 in which the group will be 4-Engel. If we assume 3-local assumption (that is every 3-generator subgroup is nilpotent of class 5-1=4, then answer is positive and the nilpotency class of the whole group is at most 6. It follows from Corollary of H. Heineken, Bounds for the nilpotency class of a group, J. London Math. Soc. 37 (1962), 456–458. There is a related question. One may look at the following: Abdollahi, Alireza Certain locally nilpotent varieties of groups, Bull. Austral. Math. Soc. 67 (2003), no. 1, 115–119.