The code is Safe Work Australia's Model Code of Practice: Excavation work, read alongside its Excavation safety topic page.
The code carries its own caveat: check with the local regulator whether this Code of Practice has legal effect in your jurisdiction.
Who the duty sits on
The duty sits on the person conducting a business or undertaking, the PCBU.
Under the code, the PCBU must remove the risks that excavation work creates, and where that is not reasonably practicable, minimise them so far as is reasonably practicable.
Safe Work Australia's excavation page states the same duty in plain terms: as a person conducting a business or undertaking, you have a duty to keep workers and your workplace safe from the risks of excavation.
Safe Work Australia's excavation page defines the term.
Excavation work means work to make an excavation, or to fill or partly fill one, and it includes removing soil or rock from a site to form an open face, hole or cavity.
The page also classes excavation as a type of construction work, which brings the construction work requirements with it.
Its reason is on the same page: excavation is dangerous work, and collapses can happen quickly, making it hard for workers and others to escape.
Everyone in the workplace has WHS duties under the model WHS Act, and the model WHS Regulations add duties on managing risks of excavation, falls from heights and noise.
The statement that comes before the work
Before high risk construction work begins, a safe work method statement has to be prepared. The code puts the duty on the PCBU: it must prepare a SWMS, or ensure one has been prepared.
Two examples of that class are written into the code.
Work in or near a tunnel, or a shaft or trench whose excavated depth is greater than 1.5 metres, is high risk construction work, and a SWMS must be prepared for it.
The second is height: work where a person could fall more than 2 metres is also in that class, and a SWMS has to be prepared before it commences.
Where depth comes in
Depth appears in more than one duty, and the code words each one its own way. High risk construction work is written at a depth of greater than 1.5 metres.
The trenching duty is written differently: the code puts a duty on a PCBU proposing to dig a trench at least 1.5 metres deep.
So far as is reasonably practicable, the work area must be kept secure from entry, whether unauthorised or inadvertent.
Those are two different duties with two different lines, and the code keeps them apart.
For the trench itself, the risk of collapse has to be reduced by supporting every side, using one or more of these measures: shoring by shielding or comparable means, benching, or battering.
There is an alternative on paper. Support may be set aside if a geotechnical engineer's written advice says every side of the trench is safe from collapse, for a period the advice states, on any conditions it sets.
Depth is not the end of it. Where a worker entering a trench could be engulfed, the code's control measures should be in place whatever the depth.
Benching or battering has its own limit: the code sets an angle of repose ceiling of 45 degrees, unless a competent person designs it and certifies it in writing.
Plant and loads have their own rule: machinery, vehicles and stored material, including excavated soil, should keep out of an excavation's zone of influence.
The exception is ground support designed by a competent person, such as a geotechnical engineer, to carry those loads.
The code also lists signs of imminent collapse: water seeping into the excavation, and tension cracks in the ground surface or in the side walls of buildings.
Emergency plans
A PCBU, such as an excavation contractor, must have an emergency plan in place for the workplace.
In the code's words, the plan is a written set of instructions for what workers and others there should do in an emergency.
One duty reaches past the site boundary: the code says excavation can seriously affect the stability of a structure at or next to the work.
Excavation must not begin until steps are taken to stop a potentially affected building or structure collapsing, wholly or in part.
Papers the code names
These duties are owed by the business running the work, the PCBU.
The code names two papers: the safe work method statement prepared before high risk construction work starts, and the written emergency plan for the workplace.
If a trench is proposed, the depth in the plan is worth reading closely: the code's trenching duty attaches at a trench at least 1.5 metres deep.
Its high risk construction work class attaches at a depth greater than 1.5 metres.
For anything beyond that, Safe Work Australia says plainly that it is not a regulator and cannot advise on workplace WHS issues, and points to the state or territory work health and safety authority for help.
That authority is the one to ask for the jurisdiction the work is in.