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:
1 parent
45bcce679b
commit
4774bd9abd
14 files changed
+139
-33
No files matched your search
@@ -40,11 +40,14 @@ pub(crate) enum Guard {
|
||||
DuplicateVendorRef,
|
||||
/// The first invoice number cannot change once one is issued.
|
||||
FirstNumberLocked,
|
||||
/// No audit stands at the books' current head to rest this on (plan
|
||||
/// P8): run `books.audit`.
|
||||
AuditRequired,
|
||||
}
|
||||
|
||||
impl Guard {
|
||||
/// Every guard, for the registry test.
|
||||
pub(crate) const ALL: [Guard; 10] = [
|
||||
pub(crate) const ALL: [Guard; 11] = [
|
||||
Guard::StalePreview,
|
||||
Guard::FormatUpgradePending,
|
||||
Guard::ReceiptRequired,
|
||||
@@ -55,6 +58,7 @@ impl Guard {
|
||||
Guard::UntaggedControlLine,
|
||||
Guard::DuplicateVendorRef,
|
||||
Guard::FirstNumberLocked,
|
||||
Guard::AuditRequired,
|
||||
];
|
||||
|
||||
/// The code an agent reads.
|
||||
@@ -70,6 +74,7 @@ impl Guard {
|
||||
Guard::UntaggedControlLine => "untagged_control_line",
|
||||
Guard::DuplicateVendorRef => "duplicate_vendor_ref",
|
||||
Guard::FirstNumberLocked => "first_number_locked",
|
||||
Guard::AuditRequired => "audit_required",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +96,7 @@ impl Guard {
|
||||
Guard::UntaggedControlLine => "books.control_check",
|
||||
Guard::DuplicateVendorRef => "books.search_entries",
|
||||
Guard::FirstNumberLocked => "books.settings",
|
||||
Guard::AuditRequired => "books.audit",
|
||||
}
|
||||
.to_string()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user