auditloop-oss 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
auditloop/models.py ADDED
@@ -0,0 +1,124 @@
1
+ """审计数据模型:全部用纯 dataclass,方便从 CSV / Excel / ERP 导出的表格逐行构造。"""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass, field
5
+ from datetime import date
6
+
7
+ # 审计认定(assertions)—— 每个检查都必须挂一个,否则底稿无法被复核
8
+ EXISTENCE = "存在性"
9
+ COMPLETENESS = "完整性"
10
+ VALUATION = "计价与分摊"
11
+ CUTOFF = "截止"
12
+ RIGHTS = "权利与义务"
13
+ CLASSIFICATION = "分类"
14
+
15
+
16
+ @dataclass
17
+ class Entry:
18
+ """总账分录(现金科目用)。"""
19
+ entry_id: str
20
+ date: date
21
+ account: str
22
+ debit: float = 0.0
23
+ credit: float = 0.0
24
+ memo: str = ""
25
+ vendor: str = ""
26
+
27
+ @property
28
+ def amount(self) -> float:
29
+ return round(self.debit - self.credit, 2)
30
+
31
+
32
+ @dataclass
33
+ class BankLine:
34
+ line_id: str
35
+ date: date
36
+ amount: float # 正=存入,负=支出
37
+ memo: str = ""
38
+
39
+
40
+ @dataclass
41
+ class Invoice:
42
+ invoice_id: str
43
+ customer: str
44
+ amount: float
45
+ issue_date: date
46
+ # AR 导出里到期日经常空着(老客户没录合同条款)。缺到期日不是崩溃,是完整性例外。
47
+ due_date: date | None = None
48
+ shipped_date: date | None = None
49
+ revenue_date: date | None = None
50
+
51
+ @property
52
+ def recognized(self) -> bool:
53
+ return self.revenue_date is not None
54
+
55
+
56
+ SEVERITIES = ("high", "medium", "low")
57
+ # 未知严重度按 medium 排序:数字大不大是次要的,**不许让一个拼错的字符串崩掉整张底稿**。
58
+ SEVERITY_RANK = {"high": 3, "medium": 2, "low": 1}
59
+ UNKNOWN_SEVERITY_RANK = 2
60
+
61
+
62
+ # 常见拼写变体 → 规范值。ERP 导出、别家底稿转过来、人工补录,同一档严重度
63
+ # 会写成 HIGH / 高 / 严重 —— 只认小写字面量的实现会让「有 high 例外」与
64
+ # `status=clean` 同时成立(审查 P1-7)。
65
+ SEVERITY_ALIASES = {
66
+ "high": "high", "h": "high", "严重": "high", "高": "high", "重大": "high",
67
+ "medium": "medium", "med": "medium", "中": "medium", "一般": "medium",
68
+ "low": "low", "l": "low", "低": "low", "轻微": "low",
69
+ }
70
+
71
+
72
+ def normalize_severity(sev: str) -> str:
73
+ """把严重度的常见变体收成规范值;**认不出来的原样返回**。
74
+
75
+ 原样返回是有意的:`critical` 这类本程序不认识的词,底稿上仍要照原文印出来
76
+ (复核人得看见上游给了什么),判定口径另由 `counts_as_high` 兜住。
77
+ """
78
+ if not isinstance(sev, str):
79
+ return sev
80
+ return SEVERITY_ALIASES.get(sev.strip().casefold(), sev)
81
+
82
+
83
+ def severity_rank(sev: str) -> int:
84
+ return SEVERITY_RANK.get(sev, UNKNOWN_SEVERITY_RANK)
85
+
86
+
87
+ def counts_as_high(sev: str) -> bool:
88
+ """能不能让结论落到 attention_required。
89
+
90
+ 认不出的严重度**按 high 处理**(fail-closed):这里判的是「要不要人看」,
91
+ 不是「多严重」。拼错一个词就静默降级成 medium,等于让上游的错字替审计师
92
+ 做了「这条例外不重要」的决定 —— 审计里最贵的一种失败。
93
+ """
94
+ return sev == "high" or sev not in SEVERITIES
95
+
96
+
97
+ @dataclass
98
+ class Finding:
99
+ check: str
100
+ assertion: str
101
+ ref: str
102
+ severity: str # high | medium | low
103
+ detail: str
104
+ amount: float = 0.0
105
+
106
+ def __post_init__(self) -> None:
107
+ self.severity = normalize_severity(self.severity)
108
+
109
+
110
+ @dataclass
111
+ class StepResult:
112
+ name: str
113
+ assertion: str
114
+ status: str = "ok" # ok | error
115
+ findings: list[Finding] = field(default_factory=list)
116
+ rows_examined: int = 0
117
+ error: str = ""
118
+ # 失败追踪是排查的唯一线索,必须显式声明成字段并进底稿;
119
+ # 原实现挂在未声明的属性上,底稿与 markdown 都不读,等于扔掉。
120
+ trace: str = ""
121
+
122
+ @property
123
+ def high(self) -> int:
124
+ return sum(1 for f in self.findings if counts_as_high(f.severity))
auditloop/workpaper.py ADDED
@@ -0,0 +1,96 @@
1
+ """底稿输出:Excel(会计师真正会打开的东西)。
2
+
3
+ 不做花哨报表 —— 三个 sheet 固定下来:摘要 / 例外 / 明细。
4
+ 摘要给合伙人看,例外给现场做调整分录,明细给复核人抽查。
5
+ """
6
+ from __future__ import annotations
7
+
8
+ from datetime import date
9
+ from pathlib import Path
10
+
11
+ from openpyxl import Workbook
12
+ from openpyxl.styles import Alignment, Font, PatternFill
13
+ from openpyxl.utils import get_column_letter
14
+
15
+ from .engine import AuditRun
16
+ from .models import severity_rank
17
+
18
+ HEAD_FILL = PatternFill("solid", fgColor="1F2937")
19
+ HEAD_FONT = Font(color="FFFFFF", bold=True)
20
+ SEV_FILL = {"high": PatternFill("solid", fgColor="FDE2E1"),
21
+ "medium": PatternFill("solid", fgColor="FEF3C7"),
22
+ "low": PatternFill("solid", fgColor="E0F2FE")}
23
+
24
+
25
+ def _header(ws, row: int, values: list[str]) -> None:
26
+ for i, v in enumerate(values, 1):
27
+ c = ws.cell(row=row, column=i, value=v)
28
+ c.fill = HEAD_FILL
29
+ c.font = HEAD_FONT
30
+ c.alignment = Alignment(vertical="center")
31
+ ws.freeze_panes = ws.cell(row=row + 1, column=1)
32
+
33
+
34
+ def _widths(ws, widths: list[int]) -> None:
35
+ for i, w in enumerate(widths, 1):
36
+ ws.column_dimensions[get_column_letter(i)].width = w
37
+
38
+
39
+ def write_workpaper(run: AuditRun, path: str | Path,
40
+ detail: dict[str, list[list]] | None = None) -> Path:
41
+ wb = Workbook()
42
+
43
+ ws = wb.active
44
+ ws.title = "摘要"
45
+ ws["A1"] = f"审计执行摘要 · {run.entity}"
46
+ ws["A1"].font = Font(size=14, bold=True)
47
+ ws["A2"] = f"期末 {run.period_end} · 生成于 {date.today()} · 结论 {run.status}"
48
+ _header(ws, 4, ["程序", "审计认定", "执行状态", "例外数", "high 例外", "错误"])
49
+ row = 5
50
+ for r in run.results:
51
+ ws.cell(row=row, column=1, value=r.name)
52
+ ws.cell(row=row, column=2, value=r.assertion)
53
+ ws.cell(row=row, column=3, value=r.status)
54
+ ws.cell(row=row, column=4, value=len(r.findings))
55
+ ws.cell(row=row, column=5, value=r.high)
56
+ ws.cell(row=row, column=6, value=r.error or "")
57
+ if r.status == "error":
58
+ for col in range(1, 7):
59
+ ws.cell(row=row, column=col).fill = SEV_FILL["high"]
60
+ row += 1
61
+ _widths(ws, [26, 16, 14, 10, 12, 46])
62
+
63
+ ws2 = wb.create_sheet("例外")
64
+ _header(ws2, 1, ["程序", "认定", "严重度", "对象", "说明", "金额"])
65
+ for i, f in enumerate(sorted(run.findings, key=lambda x: -severity_rank(x.severity)), 2):
66
+ vals = [f.check, f.assertion, f.severity, f.ref, f.detail, f.amount]
67
+ for j, v in enumerate(vals, 1):
68
+ c = ws2.cell(row=i, column=j, value=v)
69
+ c.alignment = Alignment(vertical="top", wrap_text=(j == 5))
70
+ ws2.cell(row=i, column=3).fill = SEV_FILL.get(f.severity, SEV_FILL["low"])
71
+ _widths(ws2, [22, 14, 10, 18, 62, 14])
72
+
73
+ ws3 = wb.create_sheet("明细")
74
+ _header(ws3, 1, ["数据集", "行号", "内容"])
75
+ row_idx = 2
76
+ if detail:
77
+ for name, rows in detail.items():
78
+ for idx, content in enumerate(rows, 1):
79
+ ws3.cell(row=row_idx, column=1, value=name)
80
+ ws3.cell(row=row_idx, column=2, value=idx)
81
+ ws3.cell(row=row_idx, column=3, value=str(content))
82
+ row_idx += 1
83
+ # 失败程序的追踪进明细:摘要只放一句原因,完整栈放这里,复核时才有得看
84
+ for res in run.results:
85
+ if res.status == "error" and res.trace:
86
+ ws3.cell(row=row_idx, column=1, value=f"失败追踪:{res.name}")
87
+ ws3.cell(row=row_idx, column=2, value=0)
88
+ cell = ws3.cell(row=row_idx, column=3, value=res.trace.strip())
89
+ cell.alignment = Alignment(vertical="top", wrap_text=True)
90
+ row_idx += 1
91
+ _widths(ws3, [18, 8, 90])
92
+
93
+ p = Path(path)
94
+ p.parent.mkdir(parents=True, exist_ok=True)
95
+ wb.save(p)
96
+ return p
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: auditloop-oss
3
+ Version: 0.1.0
4
+ Summary: 给中小会计师事务所的审计底稿自动化:银行调节、账龄、收入截止,例外清单 + Excel 底稿
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/aidless/auditloop
7
+ Project-URL: Source, https://github.com/aidless/auditloop
8
+ Project-URL: Issues, https://github.com/aidless/auditloop/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Topic :: Office/Business :: Financial :: Accounting
15
+ Classifier: Operating System :: OS Independent
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: openpyxl>=3.1
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest>=8; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ # audit-loop
25
+
26
+ 给中小会计师事务所的**审计底稿自动化内核**:银行余额调节、应收账龄、收入截止测试、重复付款检测,
27
+ 输出例外清单 + 可直接归档的 Excel 底稿。它不替你下审计结论,只把重复的比对做成确定性代码,
28
+ 把「需要人判断的那几条」列清楚 —— 每一条例外都带审计认定、业务主键和一句可复核的理由。
29
+ > 本文档里的可复算数字由 `scripts/check_readme.py` 机检:README 漂移即 fail build(`--selftest` 含必红 + 必绿反证)。
30
+
31
+
32
+ ## 安装
33
+
34
+ ```bash
35
+ pip install -e . # 只依赖 openpyxl
36
+ ```
37
+
38
+ ## 快速开始:Excel 工作流(十分钟跑出第一份结果)
39
+
40
+ 审计师手上是 Excel,不是 JSON。整条链路只用到三条命令:
41
+
42
+ ```bash
43
+ # 1. 生成填空模板(默认写到 out/init/facts.xlsx,--dir 可换目录)
44
+ auditloop init
45
+
46
+ # 2. 在 Excel 里打开 facts.xlsx,把四个示例行换成自家四个年度的数
47
+ # sheet「年度数据」,表头:年度 / 营业收入 / 应收账款 / 毛利 / 经营活动现金流
48
+ # 单位:元;某年没有的数留空(空 ≠ 0),年度必须是数字
49
+
50
+ # 3. 跑分析性程序(按后缀自动认 .xlsx / .json)
51
+ auditloop analytics --facts out/init/facts.xlsx
52
+
53
+ # 4. 跑六项审计程序,输出三页 Excel 底稿
54
+ auditloop run --entity "某制造有限公司" --out out/workpaper.xlsx
55
+ ```
56
+
57
+ `auditloop analytics` 的退出码:
58
+
59
+ | 码 | 含义 |
60
+ | ---: | --- |
61
+ | 0 | 跑完,至少一条指标判定成立且无异常 |
62
+ | 1 | 跑完,有异常 |
63
+ | 2 | 没跑成:文件缺失、表头认不出、年度非数字 |
64
+ | 3 | 跑完了,但一条指标都没判定成(只有一个财年,或应收/毛利/现金流全缺);stderr 印「未判定 N 项 / 共 M 项」 |
65
+
66
+ 第 3 档是刻意与 0 分开的:`0` 的含义是「查过了,没问题」,全部算不出来时必须能被流水线认出来。
67
+
68
+ 分析性程序也接受 JSON,形状与 Excel 读回来的一致:
69
+
70
+ ```json
71
+ {"entity": "Acme Industrial",
72
+ "years": {"2023": {"revenue": 1000.0, "receivables": 100.0,
73
+ "gross_profit": 400.0, "cfo": 250.0}}}
74
+ ```
75
+
76
+ ## 六项审计程序(判据各一句)
77
+
78
+ | 程序 | 认定 | 判据 |
79
+ | --- | --- | --- |
80
+ | `bank_recon` 银行余额调节 | 存在性 / 完整性 | 按金额 + 3 天日期窗口做 1:1 匹配,金额相同但超窗记「未达账项」,只对现金类科目做(大小写不敏感匹配 `银行存款/现金/cash/bank`)。 |
81
+ | `ar_aging` 应收账龄 | 计价与分摊 | 按到期日算逾期天数,`>90` 天且有发票时汇总成一条例外,提示评估坏账准备;缺到期日的发票单列一桶。 |
82
+ | `revenue_cutoff` 收入截止 | 截止 | 已确认收入但发货日晚于期末(`tolerance_days` 默认 0,期末当天不算例外),或本期确认收入却无发货记录,即截止例外。 |
83
+ | `duplicate_payment` 重复付款 | 存在性 | 同一供应商、同一金额、5 天内出现两笔付款(`amount < 0` 且填了 vendor),即疑重复付款。 |
84
+ | `ar_sanity` 应收异常 | 计价与分摊 | 发票金额 ≤ 0 一律列出,金额异常本身就是数据完整性问题。 |
85
+ | `ar_completeness` 应收完整性 | 完整性 | 到期日缺失(算不出账龄)或到期日早于开票日(账龄不可靠),两种分开写。 |
86
+
87
+ ## 分析性程序(三条比率/趋势)
88
+
89
+ 抽查凭证能抓错账,抓不到「账本身在讲故事」。这三条判断的是比率与趋势是否自相矛盾:
90
+
91
+ | 程序 | 触发条件 |
92
+ | --- | --- |
93
+ | `revenue_vs_receivables` | 应收增速 − 收入增速 > 20pt(渠道压货 / 提前确认收入);差 > 40pt 记 high |
94
+ | `gross_margin_trend` | 毛利率同比变动 > 3pt(成本归集或分类口径被改动) |
95
+ | `cash_conversion` | 经营现金流/收入 下滑 > 10pt 或相对下滑 > 25%(利润没变成现金) |
96
+
97
+ ## 演示输出(真实运行)
98
+
99
+ ```
100
+ # 审计执行摘要 · Acme Industrial
101
+
102
+ - 期末:2026-09-30
103
+ - 结论:**attention_required**(high 例外 3 条)
104
+
105
+ | 程序 | 认定 | 状态 | 例外 |
106
+ | --- | --- | --- | ---: |
107
+ | bank_recon | 存在性 | ok | 4 |
108
+ | ar_aging | 计价与分摊 | ok | 1 |
109
+ | revenue_cutoff | 截止 | ok | 2 |
110
+ | duplicate_payment | 存在性 | ok | 1 |
111
+ | ar_sanity | 计价与分摊 | ok | 1 |
112
+ | ar_completeness | 完整性 | ok | 1 |
113
+ ```
114
+
115
+ 例外清单(节选,`auditloop demo` 的完整输出另含 medium/low 7 条):
116
+
117
+ | 程序 | 认定 | 严重度 | 对象 | 说明 |
118
+ | --- | --- | --- | --- | --- |
119
+ | duplicate_payment | 存在性 | high | G3/G6 | Northwind 在 2026-09-20 与 2026-09-21 各付 800.00,疑似重复付款 |
120
+ | revenue_cutoff | 截止 | high | INV-1003 | Cobalt Labs 收入确认日 2026-09-30 早于发货日 2026-10-05,期末 2026-09-30 前未发货却确认收入 |
121
+ | revenue_cutoff | 截止 | high | INV-1004 | Dunmore 已确认收入但无发货记录(期末 2026-09-30) |
122
+
123
+ ## 核心纪律(每一条都有测试兜底)
124
+
125
+ | 纪律 | 为什么 | 落点 |
126
+ | --- | --- | --- |
127
+ | 每个程序必须挂一个审计认定 | 复核人先看「截止测试做了没」,不是「跑了几个脚本」 | `models.py` 六个认定常量 |
128
+ | 单步失败不终止整轮 | 现场数据永远有脏行;报错就停会被当成软件坏了 | `engine.py` try/except → `status=error` + `ref=ENGINE` 例外 |
129
+ | 只调节现金类科目 | 拿管理费用去碰银行流水会造出一堆假例外 | `checks.reconcile_bank(accounts=...)` |
130
+ | 调节差额必须能手工验算 | 底稿要能被第三方重算 | `ReconResult.difference` |
131
+ | 空单元格是「缺失」不是 0 | 补 0 会让毛利率、现金含量算出凭空成立的结论 | `excel.read_facts` |
132
+ | 底稿三页固定 | 摘要给合伙人 / 例外给现场 / 明细给复核 | `workpaper.py` |
133
+
134
+ ## 架构
135
+
136
+ ```
137
+ excel.py 年度数据模板写出 / 读回(.xlsx 与 .json 同构)
138
+ models.py Entry / BankLine / Invoice / Finding / StepResult + 六个审计认定
139
+ checks.py reconcile_bank / ar_aging / revenue_cutoff / duplicate_payments / ...
140
+ engine.py AuditRun:注册程序 → 逐个执行 → 汇总(status / high / coverage)
141
+ workpaper.py openpyxl 三页底稿(摘要 / 例外 / 明细)
142
+ fixtures.py 埋了 6 类例外的确定性夹具
143
+ cli.py init / run / analytics / demo
144
+ ```
145
+
146
+ ## 已知边界
147
+
148
+ 下面每一条都指到实现位置,说的是「什么情况下这份底稿的结论不可信」。
149
+
150
+ - **只做确定性检查,不做判断。** 全部检查是纯函数、无 IO、无随机(`checks.py:1-5`);不判重要性水平、不出审计意见、不建议调整分录。`TOL = 0.01`(`checks.py:15`)是金额匹配容差,不是重要性阈值——任何金额的例外都会被列出,是否调整由会计师决定。
151
+ - **`status=clean` 不等于没问题。** `AuditRun.status` 只在「无程序报错」且「无 high 例外」时才返回 `clean`(`AuditRun.status`;high 的判定口径见上节 `models.counts_as_high`),medium/low 例外可以同时存在于一份 `clean` 的底稿里;`coverage()` 报的是「程序跑了没」(`engine.py:79-81`),不是「风险覆盖了没」。
152
+ - **六类检查各有一组静默跳过条件,没报例外可能是没查。** `reconcile_bank` 只碰科目名里含 `银行存款/现金/cash/bank` 的分录,判断是**大小写不敏感**的子串匹配(`checks.reconcile_bank` 里的 `accounts_cf` 与现金分录筛选,`Bank Account USD`/`CASH-1000` 都能进);科目名既不含这几个词、又不是真实现金科目的(例如 `其他货币资金`)同样不参与;`duplicate_payments` 只分组 `amount < 0 and vendor` 的分录,没填 vendor 的付款即使同日同额重复也一条例外都不出;`revenue_cutoff` 只处理 `inv.recognized` 为真的发票,未确认收入的发票整条跳过;`ar_aging` 按发票全额、按 `due_date` 算(`checks.py:88-112`),没有回款核销匹配,部分回款的发票仍按全额在账。
153
+ - **分析性程序有单独的 CLI 出口,但不在 `run` 的底稿里。** `auditloop run` 仍只注册 6 个程序(`cli.py:build_run`);三条比率/趋势检查走 `auditloop analytics --facts <Excel 或 JSON> [--json]`(`cli.py:cmd_analytics`),退出码四档见上。输入用 `auditloop init` 生成的 Excel 填,或自己把 ERP/XBRL 导成 `revenue`/`receivables`/`gross_profit`/`cfo`:缺列或某年缺数时那条会印「数据不足」(`analytics.py:54-55,100-101`,`_num` 挡 `None`、`prev==0` 在 `analytics.py:44-48`),不再与「跑了且没问题」共用同一行输出。
154
+ - **Excel 输入要求表头与年度可解析。** 表头逐字为 `年度 / 营业收入 / 应收账款 / 毛利 / 经营活动现金流`(`excel.HEADERS`),第一行认不出时直接报错并列出期望表头;年度列必须是数字(容忍 `2023年`、`FY2023`),非数字报错带 Excel 行号;同一财年出现两行直接报错而不是静默取后者。空单元格表示该年没有这一列的数,三条程序会据此报「数据不足」。公式单元格读的是 Excel 保存下来的缓存值(`openpyxl` 的 `data_only`),文件若从未在 Excel 里打开并保存过,`=SUM(...)` 这类格子会被读成空白 —— 需要先保存一次,或直接填数值。
155
+ - **期间与日期全是朴素 `date`,无时区、无缺省。** 期末日由调用方传入(`fixtures.PERIOD_END`),`revenue_cutoff` 的 `tolerance_days` 默认 0(`checks.revenue_cutoff(tolerance_days=...)`):发货日等于期末日不算例外,晚一天就算;带时间戳的导出行必须先归一到同一时区的日历日,否则 23:00 与次日 01:00 会落到相邻两天。`due_date` 为空的发票不进任何逾期桶,单列「无到期日」(`checks.py:95-99`)——算不出账龄就报不出逾期,也不会被默认算成「未到期」。
156
+ - **每条例外只带业务主键,不带源文件行号。** `Finding.ref` 是发票号/凭证号(重复付款写成 `G3/G6`,程序自身失败写成 `ENGINE`,`engine.py:49-51`);底稿「明细」页的「行号」是导出时的顺序号 `enumerate(rows, 1)`(`workpaper.py:78`),源数据筛过行之后它与原始 Excel 行号不再对应,落到「哪个文件哪一行」得靠 ref 回原表查。也只报了这 6 类 + 3 类分析性程序能查的东西:函证、抽样、期后事项、关联方披露都不在范围内(见路线图)。
157
+ - **单步失败不会终止整轮,但会让结论降级。** 异常被捕获成 `status=error` 并注入一条 `ref=ENGINE` 的 high 例外(`engine.py:46-53`),整体 `status` 变成 `degraded`(`engine.py:67-68`);此时「其余程序都 ok」不代表数据没问题,只代表它们没在那批脏行上崩。
158
+
159
+ ## 严重度
160
+
161
+ `Finding.severity` 的规范值是 `high` / `medium` / `low`。常见变体(`HIGH`、`高`、`严重`、
162
+ `Medium`…)在构造时归一成规范值;**认不出来的值原样保留**,但判定上一律**按 high 处理**
163
+ (`models.counts_as_high`)。理由:这里判的是「要不要人看一眼」,不是「多严重」——
164
+ 上游拼错一个词就静默降级,等于让错字替审计师决定「这条例外不重要」。
165
+ 所以 `status=clean` 只会在「无程序报错」且「无 high 例外、且没有无法识别的严重度」时出现。
166
+
167
+ ## 路线图
168
+
169
+ - [x] 三个核心程序 + 重复付款 + 数据完整性 + 底稿导出
170
+ - [x] Excel 模板进出(`init` / `analytics --facts x.xlsx`)
171
+ - [ ] 函证匹配(银行/往来对账单 PDF → 结构化)
172
+ - [ ] 抽样引擎(PPS / 分层随机,含可复现随机种子)
173
+ - [ ] 上期底稿对比(哪些例外已整改、哪些重犯)
174
+ - [ ] 调整分录生成(例外 → 建议分录,人来签字)
175
+
176
+ ## 许可证
177
+
178
+ MIT,见 [LICENSE](LICENSE)。
@@ -0,0 +1,15 @@
1
+ auditloop/__init__.py,sha256=Hs1aqH3muWAG5Vw9zRsSwn-h1eLoFnurIDemnte6eq8,338
2
+ auditloop/analytics.py,sha256=PI2wJZSQT0uzkmor1jScuurJFd_dkmxGUBxEuYKQ9B4,13235
3
+ auditloop/checks.py,sha256=9sXiVR_897uGv3rTUOaur0l5njTtvtVLxeciodz3Usk,8846
4
+ auditloop/cli.py,sha256=1tJBxsGuuLq8lyJr2C8jtjdJ_I8HsRdnouM3LT6YFRo,12635
5
+ auditloop/engine.py,sha256=Uz9VTYMrvBcJ6c6APWF5M6Z9naVm2TnNSPiyvrza_8Y,4566
6
+ auditloop/excel.py,sha256=Ju2uO8kFmJjlnuAL1X833iPFAmxe4mQ2sWAMd7KuDo4,7574
7
+ auditloop/fixtures.py,sha256=Dqbmc1XLf0tBMWzJxHigkLITAQ-cKCtBT_aYxSWVAIs,2880
8
+ auditloop/models.py,sha256=y0eAKlEWwoLpIfsQXTz-ThzuxdaWt2NjO40GjPFh8-k,3874
9
+ auditloop/workpaper.py,sha256=7-RQnLaMhJRLP8BXx8q3ZNtpLKe3csiHlYQTXAwNYyg,3909
10
+ auditloop_oss-0.1.0.dist-info/licenses/LICENSE,sha256=S8dBeLVeMCGHLX_Yyv4lFLHu59poaPXlSH-9mnDq2-E,1080
11
+ auditloop_oss-0.1.0.dist-info/METADATA,sha256=lyMAMeiOsMzAY6mAg9_013d1NfMMYCvL4hbLUbGTPDg,12836
12
+ auditloop_oss-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
13
+ auditloop_oss-0.1.0.dist-info/entry_points.txt,sha256=MC2uxhIyiqdBFuCeANiSpoxjVNaLA7Z3EdLkFXakWv8,49
14
+ auditloop_oss-0.1.0.dist-info/top_level.txt,sha256=ZKOpup6mxQ3d5Tg2StLQETQjgPwFFBD0rLgLnr4L7V0,10
15
+ auditloop_oss-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ auditloop = auditloop.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 clone-labs contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ auditloop