If by P.31.1.3, you meant P.31.1.3.1, then perhaps you misread it (emphasis mine):
In monocyclic homogeneous unsaturated compounds, one double or triple bond is always allocated the locant ‘1’. When alone, the locant ‘1’ is omitted in names.
Both of your given names are in accordance with this rule.
P-31.1.1.1 The presence of one or more double or triple bonds in an otherwise saturated parent hydride (...) is denoted by changing the ending ‘ane’ of the name of a saturated parent hydride to ‘ene’ or ‘yne’. Locants as low as possible are given to multiple bonds as a set, even though this may at times give ‘yne’ endings lower locants than ‘ene’ endings. If a choice remains, preference for low locants is given to the double bonds. In names, the ending ‘ene’ always precedes ‘yne’, with elision of the final letter ‘e’ in ‘ene’. (...)
Since the set of locants [1,3,5] is lower than [1,5,7], the name (Z)-cycloocta-3-en-1,5-diyne is preferred.