The Education Minister appears to have been persuaded by secondary heads that they should be given the flexibility to go beyond these limits if circumstances warrant it, so long as that would give them a class size average of 20.
Mr Peacock is likely to announce the move at the Headteachers' Association of Scotland's annual conference next week in St Andrews. But he is expected to tell heads that, if they wish to vary class sizes above the limit of 20, they must do so with the endorsement of the school board or whatever body replaces it under new legislation planned for next year.
Since the deal on class sizes was struck by Labour and the Liberal Democrats under their partnership agreement at the last election, headteachers have been campaigning for greater room for manoeuvre, insisting that the prescriptive limit cannot be reconciled with the Executive's avowed desire to devolve more power to them.
The Headteachers' Association of Scotland argues that the Executive will not be able to meet the commitment because of teacher shortages. Schools, it suggests, should be allowed to use additional staffing to ease the burdens of class sizes across the school.
Bill McGregor, the association's general secretary, commented that good headteachers would run all of their plans before a school board anyway, so a requirement that class size variations had to be endorsed by a board would be welcome.
However, Ronnie Smith, general secretary of the Educational Institute of Scotland, has grave concerns about any further deregulation of class size limits and challenged the involvement of school boards. "The notion that there would be more of an influence given to school boards than to staffs who have to work with these classes is an extraordinary back to front approach to adopt," Mr Smith said.
"There has been a lot of talk about investing more in headteachers'
freedom, but devolving that decision to the headteacher is contrary to the aims of collegiality which underpin the teachers' agreement. It would seem strange in the extreme if the decisions around class formation were to be regarded as everybody's business bar the business of the teacher."
Mr Smith said that the Executive should stick to the "unqualified commitment" on class sizes in the partnership agreement. "It was not qualified by any freedom to headteachers unilaterally to depart from it. We know that headteachers' decisions will not be driven by educational considerations but by resource constraints."
But Alan Smith, president of the Scottish School Board Association, described the proposal as "reasonable", particularly in light of Mr Peacock's commitment to allow schools to take account of local circumstances.
Mr Peacock is understood to have been won over to greater flexibility by headteachers such as Jim Dalziel of Eastbank Academy in Glasgow. Over the past three years, it has been piloting a scheme called "Enable" which allows primary teachers to take smaller classes of S1 and S2 English and maths students to raise the performance of those who are struggling in literacy and numeracy.
Three of these Enable English classes have 15 pupils, but some more able classes go up to 28 pupils. If the Enable classes are excluded, the remaining classes have an average size of 22, but the average class size across the whole cohort is 20.7.
In maths, the same principle has been applied. Because fewer maths teachers are available, however, the average size is slightly above 20 in S1 and slightly higher in S2.
"These classes are being set based upon what we see as the children's needs," Mr Dalziel told The TES Scotland. "As long as he (Mr Peacock) is not rejigging the figures given to us, and if the minister is going to introduce that flexibility, then obviously I would welcome such a move."