feat(audit): fit the audit tools into the agent surface (P8)

After P5 merged first: a close leads to the audit and the period's
attestation, an audit run to its workpaper and the claims behind it, the
attest tools to the attestations and the CPA package; a refusal for want of
a standing audit is the guard audit_required with books.audit as its
remedy; the audit prompt runs the audit tools. policy.cpa_package_requires_audit,
unset, refuses once the books hold an audit run and warns before, so a
book that has not begun the programme is not stopped from its first handoff
by a rule it has not met; set to refuse, it holds from the start.
bookspec states B-45 (convention) in its checker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
swaitsandClaude Fable 5.1 committed 2026-10-29 16:03:53 -06:00
1 parent 45bcce679b
commit 4774bd9abd
14 files changed
+139 -33

No files matched your search

+11 -4
View File
@@ -418,7 +418,7 @@ pub static KEYS: &[Key] = &[
toml: ("books", "cpa_package_requires_audit"),
kind: Kind::Choice(AUDIT_REQUIRED),
sensitivity: Sensitivity::Public,
doc: "Whether books.export_cpa_package waits for an audit: refuse (the package is refused unless an audit for the handoff or a full audit at the current books has its period attested; a reason given for the export overrides it and is recorded as a decision) or warn (the package is made and says so). Unset: refuse.",
doc: "Whether books.export_cpa_package waits for an audit: refuse (the package is refused unless an audit for the handoff or a full audit at the current books has its period attested; a reason given for the export overrides it and is recorded as a decision) or warn (the package is made and says so). Unset: refuse once the books hold an audit run, warn before.",
},
Key {
name: "backup.git_remote",
@@ -1639,9 +1639,16 @@ impl Settings {
.unwrap_or_default()
}
/// `policy.cpa_package_requires_audit` (unset: refuse).
pub fn cpa_package_requires_audit(&self) -> bool {
self.str("policy.cpa_package_requires_audit") != Some("warn")
/// `policy.cpa_package_requires_audit`: `Some(true)` for refuse,
/// `Some(false)` for warn, `None` when unset (the package then refuses
/// once the books hold an audit run, and warns before: the owner has
/// not begun the programme).
pub fn cpa_package_requires_audit(&self) -> Option<bool> {
match self.str("policy.cpa_package_requires_audit") {
Some("warn") => Some(false),
Some(_) => Some(true),
None => None,
}
}
/// `backup.git_remote`, if set.