@v587d/capital-generation 2.7.7 → 2.7.8
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.
- package/CHANGELOG.md +59 -0
- package/README.md +5 -4
- package/THIRD_PARTY_NOTICES.md +14 -3
- package/capital-config/client.js +4 -4
- package/capital-config/package.json +1 -1
- package/capital-watchlist/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +2 -1
- package/selected-skills/README.md +3 -1
- package/selected-skills/catalog.js +155 -0
- package/selected-skills/financeskills/LICENSE +21 -0
- package/selected-skills/financeskills/UPSTREAM.md +202 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/references/feature-engineering.md +20 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/references/ml-algorithms.md +28 -0
- package/selected-skills/financeskills/skills/aro-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/aro-computation/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/aro-computation/references/aro-standards.md +22 -0
- package/selected-skills/financeskills/skills/aro-computation/references/pv-math.md +27 -0
- package/selected-skills/financeskills/skills/audit-checklist/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/audit-checklist/SKILL.md +77 -0
- package/selected-skills/financeskills/skills/audit-checklist/references/internal-controls.md +36 -0
- package/selected-skills/financeskills/skills/audit-checklist/references/isa-standards.md +26 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/SKILL.md +87 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/assets/reconciliation-statement-template.md +31 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/references/fuzzy-logic.md +27 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/references/rec-controls.md +28 -0
- package/selected-skills/financeskills/skills/banking-compliance/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/banking-compliance/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/banking-compliance/references/basel-iii-framework.md +26 -0
- package/selected-skills/financeskills/skills/banking-compliance/references/risk-weights.md +32 -0
- package/selected-skills/financeskills/skills/budget-forecast/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/budget-forecast/SKILL.md +87 -0
- package/selected-skills/financeskills/skills/budget-forecast/references/forecasting-best-practices.md +26 -0
- package/selected-skills/financeskills/skills/budget-forecast/references/scenario-analysis.md +25 -0
- package/selected-skills/financeskills/skills/close-management/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/close-management/SKILL.md +85 -0
- package/selected-skills/financeskills/skills/close-management/references/close-task-library.md +32 -0
- package/selected-skills/financeskills/skills/company-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/company-valuation/SKILL.md +80 -0
- package/selected-skills/financeskills/skills/company-valuation/references/terminal-value-guide.md +33 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/references/consolidation-standard.md +28 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/references/minority-interest.md +25 -0
- package/selected-skills/financeskills/skills/credit-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/credit-analysis/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/credit-analysis/references/covenant-guide.md +26 -0
- package/selected-skills/financeskills/skills/crypto-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/crypto-accounting/SKILL.md +81 -0
- package/selected-skills/financeskills/skills/crypto-accounting/references/fasb-crypto.md +26 -0
- package/selected-skills/financeskills/skills/crypto-accounting/references/ifrs-crypto.md +25 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/references/cvp-patterns.md +28 -0
- package/selected-skills/financeskills/skills/debt-payoff/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/debt-payoff/SKILL.md +94 -0
- package/selected-skills/financeskills/skills/debt-payoff/references/debt-strategies.md +32 -0
- package/selected-skills/financeskills/skills/debt-payoff/references/interest-calculations.md +27 -0
- package/selected-skills/financeskills/skills/debt-restructuring/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/debt-restructuring/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/debt-restructuring/references/creditor-priority.md +26 -0
- package/selected-skills/financeskills/skills/debt-restructuring/references/restructuring-types.md +24 -0
- package/selected-skills/financeskills/skills/deferred-tax/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/deferred-tax/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/deferred-tax/references/td-catalogue.md +39 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/references/forecasting-eac.md +27 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/references/pmi-evm.md +29 -0
- package/selected-skills/financeskills/skills/ecl-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/ecl-computation/SKILL.md +85 -0
- package/selected-skills/financeskills/skills/ecl-computation/references/ifrs9-standard.md +27 -0
- package/selected-skills/financeskills/skills/ecl-computation/references/risk-modeling.md +26 -0
- package/selected-skills/financeskills/skills/esg-reporting/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/esg-reporting/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/esg-reporting/references/ghg-protocol.md +22 -0
- package/selected-skills/financeskills/skills/esg-reporting/references/sasb-map.md +25 -0
- package/selected-skills/financeskills/skills/financial-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/financial-analysis/SKILL.md +108 -0
- package/selected-skills/financeskills/skills/financial-analysis/assets/analysis-memo-template.md +31 -0
- package/selected-skills/financeskills/skills/financial-analysis/references/accounting-standards.md +45 -0
- package/selected-skills/financeskills/skills/financial-analysis/references/ratio-definitions.md +14 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/references/useful-life-guide.md +30 -0
- package/selected-skills/financeskills/skills/forensic-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/forensic-accounting/SKILL.md +91 -0
- package/selected-skills/financeskills/skills/forensic-accounting/references/benfords-law.md +24 -0
- package/selected-skills/financeskills/skills/forensic-accounting/references/fraud-triangle.md +26 -0
- package/selected-skills/financeskills/skills/insurance-reserving/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/insurance-reserving/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/insurance-reserving/references/actuarial-methods.md +33 -0
- package/selected-skills/financeskills/skills/insurance-reserving/references/insurance-metrics.md +26 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/references/elimination-entries.md +35 -0
- package/selected-skills/financeskills/skills/inventory-costing/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/inventory-costing/SKILL.md +80 -0
- package/selected-skills/financeskills/skills/inventory-costing/references/costing-examples.md +31 -0
- package/selected-skills/financeskills/skills/investment-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/investment-analysis/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md +31 -0
- package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md +29 -0
- package/selected-skills/financeskills/skills/journal-entry/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/journal-entry/SKILL.md +94 -0
- package/selected-skills/financeskills/skills/journal-entry/assets/journal-entry-template.md +21 -0
- package/selected-skills/financeskills/skills/journal-entry/references/entry-patterns.md +51 -0
- package/selected-skills/financeskills/skills/lbo-modeling/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/lbo-modeling/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/lbo-modeling/references/debt-structures.md +22 -0
- package/selected-skills/financeskills/skills/lbo-modeling/references/lbo-best-practices.md +27 -0
- package/selected-skills/financeskills/skills/lease-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/lease-accounting/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/lease-accounting/assets/commencement-summary-template.md +28 -0
- package/selected-skills/financeskills/skills/lease-accounting/references/ibr-guide.md +26 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/references/asset-valuation.md +40 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/references/net-worth-benchmarks.md +33 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/SKILL.md +77 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/finbert-guide.md +26 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/linguistic-finance.md +23 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/references/sec-reporting.md +22 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/references/spe-standards.md +25 -0
- package/selected-skills/financeskills/skills/personal-budgeting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/personal-budgeting/SKILL.md +100 -0
- package/selected-skills/financeskills/skills/personal-budgeting/references/budgeting-methods.md +40 -0
- package/selected-skills/financeskills/skills/personal-budgeting/references/spending-categories.md +40 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/references/startup-metrics.md +27 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/references/time-series-forecasting.md +22 -0
- package/selected-skills/financeskills/skills/product-profitability/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/product-profitability/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/product-profitability/references/allocation-logic.md +28 -0
- package/selected-skills/financeskills/skills/product-profitability/references/unit-economics.md +30 -0
- package/selected-skills/financeskills/skills/retirement-planning/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/retirement-planning/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/retirement-planning/references/compound-growth.md +38 -0
- package/selected-skills/financeskills/skills/retirement-planning/references/retirement-fundamentals.md +29 -0
- package/selected-skills/financeskills/skills/revenue-recognition/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/revenue-recognition/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/revenue-recognition/assets/allocation-workpaper-template.md +30 -0
- package/selected-skills/financeskills/skills/revenue-recognition/references/ifrs15-guide.md +28 -0
- package/selected-skills/financeskills/skills/revenue-recognition/references/saas-rev-rec.md +26 -0
- package/selected-skills/financeskills/skills/risk-assessment/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/risk-assessment/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/risk-assessment/references/hedging-guide.md +24 -0
- package/selected-skills/financeskills/skills/risk-assessment/references/risk-metrics.md +24 -0
- package/selected-skills/financeskills/skills/sox-compliance/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/sox-compliance/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/sox-compliance/references/sampling-methodology.md +27 -0
- package/selected-skills/financeskills/skills/startup-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/startup-valuation/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/startup-valuation/references/berkus-method.md +25 -0
- package/selected-skills/financeskills/skills/startup-valuation/references/vc-method.md +23 -0
- package/selected-skills/financeskills/skills/statement-preparation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/statement-preparation/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/statement-preparation/references/accruals-deferrals.md +24 -0
- package/selected-skills/financeskills/skills/statement-preparation/references/cash-flow-method.md +32 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/SKILL.md +97 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/references/account-types.md +33 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/references/asset-location.md +36 -0
- package/selected-skills/financeskills/skills/tax-planning/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/tax-planning/SKILL.md +93 -0
- package/selected-skills/financeskills/skills/tax-planning/references/common-deductions.md +28 -0
- package/selected-skills/financeskills/skills/tax-planning/references/tax-code-lookup.md +25 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/references/model-checks.md +32 -0
- package/selected-skills/financeskills/skills/treasury-management/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/treasury-management/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/treasury-management/references/fx-hedging.md +27 -0
- package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md +24 -0
- package/selected-skills/financeskills/skills/variance-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/variance-analysis/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/variance-analysis/references/overhead-logic.md +24 -0
- package/selected-skills/financeskills/skills/variance-analysis/references/variance-math.md +35 -0
- package/selected-skills/financeskills/skills/venture-debt/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/venture-debt/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/venture-debt/references/saas-debt-metrics.md +26 -0
- package/selected-skills/financeskills/skills/venture-debt/references/venture-lending.md +23 -0
- package/selected-skills/financeskills/skills/wacc-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/wacc-computation/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/wacc-computation/assets/wacc-memo-template.md +40 -0
- package/selected-skills/financeskills/skills/wacc-computation/references/beta-math.md +24 -0
- package/selected-skills/financeskills/skills/wacc-computation/references/capm-basics.md +24 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/references/wc-metrics.md +30 -0
package/chart-ui/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* between validation and connect. Closing that window would require a custom
|
|
7
7
|
* dispatcher; this module keeps the same explicit trade-off as dsh-search-first.
|
|
8
8
|
*/
|
|
9
|
-
export declare const LOCAL_FETCH_CLIENT_VERSION = "2.7.
|
|
9
|
+
export declare const LOCAL_FETCH_CLIENT_VERSION = "2.7.8";
|
|
10
10
|
export declare const LOCAL_FETCH_MAX_URL_LENGTH = 2048;
|
|
11
11
|
export type LocalFetchErrorCode = 'ABORTED' | 'TIMEOUT' | 'INVALID_URL' | 'BLOCKED_URL' | 'DNS' | 'REDIRECT' | 'HTTP' | 'TOO_LARGE' | 'UNSUPPORTED_CONTENT_TYPE';
|
|
12
12
|
export declare class LocalFetchError extends Error {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* dispatcher; this module keeps the same explicit trade-off as dsh-search-first.
|
|
8
8
|
*/
|
|
9
9
|
import { htmlToMarkdown, stripInvisibleText } from './html-markdown.js';
|
|
10
|
-
export const LOCAL_FETCH_CLIENT_VERSION = '2.7.
|
|
10
|
+
export const LOCAL_FETCH_CLIENT_VERSION = '2.7.8';
|
|
11
11
|
export const LOCAL_FETCH_MAX_URL_LENGTH = 2048;
|
|
12
12
|
export class LocalFetchError extends Error {
|
|
13
13
|
code;
|
|
@@ -52,7 +52,7 @@ export interface WindCallResult {
|
|
|
52
52
|
* `test/chart-composition.test.mjs` 守着(会因漂移而失败),这里原本是写死的第二处,
|
|
53
53
|
* 一次发版就得记得改两遍。所以本常量由测试一并核对(见 `test/wind-client.test.mjs`)。
|
|
54
54
|
*/
|
|
55
|
-
export declare const WIND_CLIENT_VERSION = "2.7.
|
|
55
|
+
export declare const WIND_CLIENT_VERSION = "2.7.8";
|
|
56
56
|
export interface WindClient {
|
|
57
57
|
callTool(toolName: string, args: Record<string, unknown>, signal?: AbortSignal): Promise<WindCallResult>;
|
|
58
58
|
}
|
|
@@ -35,7 +35,7 @@ export const WIND_SERVER_ENDPOINTS = {
|
|
|
35
35
|
* `test/chart-composition.test.mjs` 守着(会因漂移而失败),这里原本是写死的第二处,
|
|
36
36
|
* 一次发版就得记得改两遍。所以本常量由测试一并核对(见 `test/wind-client.test.mjs`)。
|
|
37
37
|
*/
|
|
38
|
-
export const WIND_CLIENT_VERSION = '2.7.
|
|
38
|
+
export const WIND_CLIENT_VERSION = '2.7.8';
|
|
39
39
|
function errorText(error) {
|
|
40
40
|
return error instanceof Error ? error.message : String(error);
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v587d/capital-generation",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.8",
|
|
4
4
|
"description": "Capital Generation:面向中国散户的 AI 投资助手插件(Capital mode Agent Preset)",
|
|
5
5
|
"icon": "assets/cg-icon.png",
|
|
6
6
|
"author": "v587d",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"selected-skills/peter-lynch-skill",
|
|
41
41
|
"selected-skills/trading-skills",
|
|
42
42
|
"selected-skills/claude-for-financial-services-cn",
|
|
43
|
+
"selected-skills/financeskills",
|
|
43
44
|
"cordis.patch.yml",
|
|
44
45
|
"assets/cg-icon.png",
|
|
45
46
|
"README.md",
|
|
@@ -17,7 +17,9 @@ for the user to review the source and decide whether it fits the task.
|
|
|
17
17
|
(`catalog.js`), because upstreams lay skills out differently: one buries them under a
|
|
18
18
|
plugin directory, one groups them two levels deep, and the A-share snapshot has six
|
|
19
19
|
parallel roots, of which exactly one is registered (the line upstream itself calls the
|
|
20
|
-
source of truth).
|
|
20
|
+
source of truth). The newest snapshot needed none of these — its 48 skills sit flat under
|
|
21
|
+
`skills/`, each frontmatter `name` already matching its directory, and no prose links
|
|
22
|
+
outside its own folder. Everything else in the snapshot stays unregistered material.
|
|
21
23
|
- `<project>/UPSTREAM.md`: repository URL, owner, commit, license, runtime scope,
|
|
22
24
|
maintenance notes, and local changes.
|
|
23
25
|
- `<project>/LICENSE`: original upstream license.
|
|
@@ -17,6 +17,9 @@ export const SELECTED_SKILL_SKILL_DIRS = Object.freeze({
|
|
|
17
17
|
// 因此只登记规范根那一条线:vertical-plugins/china-finance/skills —— 上游自己写明 skill 正文就 authored 在这里。
|
|
18
18
|
// 另外五条线(投行 / PE / 基金运营 / 财富 / 账户)与副本留在快照里当材料,不进可选清单。
|
|
19
19
|
'claude-for-financial-services-cn': 'vertical-plugins/china-finance/skills',
|
|
20
|
+
// 上游就是扁平的 skills/<name>/SKILL.md(48 颗一层到底,frontmatter name 与目录名逐颗一致,
|
|
21
|
+
// 正文链接全部落在自己目录内),所以前六颗踩过的套一层 / 平铺 / 多根取一都不用做。
|
|
22
|
+
financeskills: 'skills',
|
|
20
23
|
})
|
|
21
24
|
|
|
22
25
|
// Selected-skill metadata owned by Capital Generation. Upstream snapshots remain unchanged.
|
|
@@ -1144,6 +1147,158 @@ export const SELECTED_SKILL_CATALOG = Object.freeze([
|
|
|
1144
1147
|
en: 'Cold-start experiment; upstream last moved on 2026-09-14, so review the sources before use. The Long / Short directions, conviction tiers and sizing suggestions on the list are a rehearsal exercise, not orders: this plugin holds no broker interface and places nothing for you on them. Numbers a screen needs but retrieval cannot get are named as gaps rather than filled from memory.',
|
|
1145
1148
|
},
|
|
1146
1149
|
},
|
|
1150
|
+
{
|
|
1151
|
+
key: 'companyValuation',
|
|
1152
|
+
name: 'company-valuation',
|
|
1153
|
+
label: { zh: '企业估值与股权价值桥', en: 'Company Valuation' },
|
|
1154
|
+
description: {
|
|
1155
|
+
zh: '三条路估企业价值与股权价值:先剥离一次性项目做 DCF,再用同业倍数与先例交易交叉验证,最后把企业价值换成股权价值——有息负债、少数股东权益、参股公司、养老金缺口逐笔列出。',
|
|
1156
|
+
en: 'Triangulates enterprise and equity value: a DCF on normalized earnings, cross-checked against peer multiples and precedent deal multiples, then an explicit enterprise-to-equity bridge that itemizes debt-like charges, minority interests, associates and any pension deficit.',
|
|
1157
|
+
},
|
|
1158
|
+
owner: 'GAJETOso',
|
|
1159
|
+
repository: 'financeskills',
|
|
1160
|
+
status: 'watchlist',
|
|
1161
|
+
lastCommit: '2026-10-01',
|
|
1162
|
+
reviewBy: '2026-11-15',
|
|
1163
|
+
tags: ['valuation', 'cash-flow', 'us-stock'],
|
|
1164
|
+
riskNote: {
|
|
1165
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。这颗按 IFRS 与美股估值惯例写:先例交易倍数、控制权溢价 20–35% 与 EV/EBITDA 那套倍数在 A 股披露里常常拿不到同口径数据,取不到就点名缺口,不用记忆里的数补齐。它给出的估值区间与"哪几条假设真正决定答案"属于方法推演,不是订单——本插件没有券商接口,也不据它下单。',
|
|
1166
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. The method is written to IFRS and US valuation practice: precedent-transaction multiples, the 20–35% control premium and the EV/EBITDA comp set often have no same-basis counterpart in A-share disclosure — name the gap instead of filling it from memory. The concluded range and the "assumptions that actually move the answer" are a rehearsal exercise, not orders: this plugin holds no broker interface and places nothing for you.',
|
|
1167
|
+
},
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
key: 'waccComputation',
|
|
1171
|
+
name: 'wacc-computation',
|
|
1172
|
+
label: { zh: 'WACC 与资本成本估算', en: 'WACC Computation' },
|
|
1173
|
+
description: {
|
|
1174
|
+
zh: '把折现率拆开估:CAPM 各输入(无风险利率、β、股权风险溢价、规模与国家风险溢价)、可比 β 的去杠杆与再杠杆、按市值加权的税后债务成本,最后交出一张 β × 风险溢价的敏感性区间。',
|
|
1175
|
+
en: 'Builds the discount rate piece by piece — CAPM inputs (risk-free rate, beta, equity risk premium, size and country premia), unlevering and relevering peer betas on the target\u0027s capital structure, market-value weights on the after-tax cost of debt — and ends on a beta-by-premium sensitivity range.',
|
|
1176
|
+
},
|
|
1177
|
+
owner: 'GAJETOso',
|
|
1178
|
+
repository: 'financeskills',
|
|
1179
|
+
status: 'watchlist',
|
|
1180
|
+
lastCommit: '2026-10-01',
|
|
1181
|
+
reviewBy: '2026-11-15',
|
|
1182
|
+
tags: ['valuation', 'risk', 'us-stock'],
|
|
1183
|
+
riskNote: {
|
|
1184
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。正文的数字基准是美国的:无风险利率取 10 年期美债、风险溢价用美股 ERP、税率按美国边际税率。用于 A 股要换成中国 10 年期国债、境内 ERP 与 15% / 25% 那一档实际税率,这些替换值本插件没有现成来源时一律留空点名,不凭记忆填。算出的 WACC 是推演输入,不是对任何标的的判断。',
|
|
1185
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. Its numeric anchors are American: a 10-year Treasury as the risk-free rate, US equity risk premium, a US marginal tax rate. Applying it to A-shares means a China 10-year government bond yield, a local ERP and the 15% / 25% statutory rate actually paid — where this plugin has no source for the replacement value, leave it blank and say so rather than quoting memory. The computed WACC is an input to a rehearsal, not a verdict on anything.',
|
|
1186
|
+
},
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
key: 'threeStatementModeling',
|
|
1190
|
+
name: 'three-statement-modeling',
|
|
1191
|
+
label: { zh: '三表勾稽建模与诊断', en: 'Three-Statement Modeling' },
|
|
1192
|
+
description: {
|
|
1193
|
+
zh: '按固定顺序搭一张联动的三表模型:驱动因子集中一处、收入构建利润表、固定资产与营运资本与债务三张附表推动资产负债表、现金流量表完全由前两表的差额倒推,每一期都摆一行"不平就点名"的平衡检查。',
|
|
1194
|
+
en: 'Assembles a linked three-statement model in a fixed order — one place for drivers, an income statement built from revenue, PP&E / working-capital / debt schedules driving the balance sheet, a cash flow statement derived entirely from the deltas — with a balance check on every period that names the ones that do not tie.',
|
|
1195
|
+
},
|
|
1196
|
+
owner: 'GAJETOso',
|
|
1197
|
+
repository: 'financeskills',
|
|
1198
|
+
status: 'watchlist',
|
|
1199
|
+
lastCommit: '2026-10-01',
|
|
1200
|
+
reviewBy: '2026-11-15',
|
|
1201
|
+
tags: ['financial-health', 'cash-flow', 'business-analysis'],
|
|
1202
|
+
riskNote: {
|
|
1203
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。科目表按 IFRS / US GAAP 列示,A 股报表另有一批需要自己映射的行次(其他应收、合同资产与合同负债、少数股东权益等)——这颗只讲勾稽形状,不替你判断哪一笔该归哪一科目。它建的是模型骨架,产出的预测数字属于推演;需要的历史报表或附注明细取不到就点名缺口。',
|
|
1204
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. Its chart of accounts is IFRS / US GAAP, so A-share statements need their own mapping for lines such as other receivables, contract assets and liabilities, and minority interests — this skill teaches the linkage, not where a given item belongs. What it produces is a model skeleton whose projected numbers are a rehearsal; historical statements or note detail it cannot retrieve are named as gaps.',
|
|
1205
|
+
},
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
key: 'creditAnalysis',
|
|
1209
|
+
name: 'credit-analysis',
|
|
1210
|
+
label: { zh: '偿债能力与债务容量分析', en: 'Credit Analysis' },
|
|
1211
|
+
description: {
|
|
1212
|
+
zh: '回答一件事:这家公司能不能穿过周期把钱还上。杠杆、利息覆盖、DSCR、自由现金流对债务、流动性五组算式各算正常口径与压力口径,再看担保折价、清收顺序、契约余量与"谁替它兜底"。',
|
|
1213
|
+
en: 'Answers one question: can this borrower service and repay through the cycle. Five ratio families — leverage, interest coverage, DSCR, free cash flow to debt, liquidity — each on a normalized and a stressed basis, then collateral haircuts, recovery ranking, covenant headroom and who actually stands behind it.',
|
|
1214
|
+
},
|
|
1215
|
+
owner: 'GAJETOso',
|
|
1216
|
+
repository: 'financeskills',
|
|
1217
|
+
status: 'watchlist',
|
|
1218
|
+
lastCommit: '2026-10-01',
|
|
1219
|
+
reviewBy: '2026-11-15',
|
|
1220
|
+
tags: ['risk', 'financial-health', 'us-stock'],
|
|
1221
|
+
riskNote: {
|
|
1222
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。正文的"舒适阈值"(杠杆 3.0x、DSCR 1.2x 一类)是国际公司贷款的惯例值,不是任何市场的监管线;境内公司债、可转债与银行授信的契约条款和定义各不相同,要按募集说明书与年报原文核对。它写出的 approve / decline / 结构建议属信用侧的方法推演,既不是授信意见也不是订单——本插件不代你下单。',
|
|
1223
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. Its comfort thresholds (3.0x leverage, 1.2x DSCR and the rest) are international corporate-lending conventions, not any market\u0027s regulatory line; domestic bond, convertible and bank-facility covenants differ in both level and definition, so check them against the offering circular and the annual report as filed. The approve / decline / restructure it writes is a credit-side rehearsal, neither a credit opinion nor an order — this plugin places nothing for you.',
|
|
1224
|
+
},
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
key: 'eclComputation',
|
|
1228
|
+
name: 'ecl-computation',
|
|
1229
|
+
label: { zh: '预期信用损失与三阶段减值', en: 'Expected Credit Loss' },
|
|
1230
|
+
description: {
|
|
1231
|
+
zh: '按 IFRS 9 的三阶段思路把减值拆开:阶段划分与迁徙判断、PD / LGD / EAD 三参数、应收账龄的准备矩阵简化法、宏观情景加权与覆盖率,再问一句"下行情景概率提高 10% 会怎样"。',
|
|
1232
|
+
en: 'Takes the IFRS 9 impairment logic apart: stage assignment and migration, the PD / LGD / EAD parameters, the simplified provision matrix over aging buckets, macro scenario weighting and coverage ratios, then one more question — what changes if the downside scenario gains ten points of probability.',
|
|
1233
|
+
},
|
|
1234
|
+
owner: 'GAJETOso',
|
|
1235
|
+
repository: 'financeskills',
|
|
1236
|
+
status: 'watchlist',
|
|
1237
|
+
lastCommit: '2026-10-01',
|
|
1238
|
+
reviewBy: '2026-11-15',
|
|
1239
|
+
tags: ['risk', 'financial-health', 'filings'],
|
|
1240
|
+
riskNote: {
|
|
1241
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。中国《企业会计准则第 22 号》已与 IFRS 9 的三阶段框架对齐,但披露粒度不同:上市公司年报给出阶段余额与减值准备,不给出 PD / LGD 参数。所以这颗更适合用来判断别人披露的减值合不合理,而不是自己算出一个准备数;需要而取不到的明细一律点名缺口,不用合计倒推。',
|
|
1242
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. China\u0027s Accounting Standard for Business Enterprises No. 22 already follows the IFRS 9 three-stage framework, but disclosure granularity differs: listed issuers give stage balances and impairment charges, not PD / LGD parameters. Use this skill to judge whether a disclosed provision is defensible rather than to compute your own; detail that retrieval cannot get is named as a gap, never back-derived from a total.',
|
|
1243
|
+
},
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
key: 'insuranceReserving',
|
|
1247
|
+
name: 'insurance-reserving',
|
|
1248
|
+
label: { zh: '保险准备金与综合成本率', en: 'Insurance Reserving' },
|
|
1249
|
+
description: {
|
|
1250
|
+
zh: '一条准备金链条走到底:赔款发展三角、年龄到年龄因子、链式法与 Bornhuetter-Ferguson、IBNR,再落到综合成本率——把"未决赔款估得准不准"和"这单承保业务到底赚不赚钱"分成两件事。',
|
|
1251
|
+
en: 'Runs the reserve chain end to end: loss development triangles, age-to-age factors, chain ladder and Bornhuetter-Ferguson, IBNR, then the combined ratio — keeping "are unpaid claims estimated well" and "does this book actually earn" as two separate questions.',
|
|
1252
|
+
},
|
|
1253
|
+
owner: 'GAJETOso',
|
|
1254
|
+
repository: 'financeskills',
|
|
1255
|
+
status: 'watchlist',
|
|
1256
|
+
lastCommit: '2026-10-01',
|
|
1257
|
+
reviewBy: '2026-11-15',
|
|
1258
|
+
tags: ['risk', 'financial-health'],
|
|
1259
|
+
riskNote: {
|
|
1260
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。精算假设、折现与负债计量按 IFRS 17 与一般精算惯例写,境内上市险企的法定准备金、折现率参考曲线与保户储金口径另有规定。发展三角要按险种和年度拆开的赔款明细,这类粒度在公开披露里常常取不到——点名缺口,不要拿合计数摊。',
|
|
1261
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. Its actuarial assumptions, discounting and measurement follow IFRS 17 and general actuarial practice; statutory reserves, the reference yield curve and policyholder-deposit treatment for listed Chinese insurers follow separate rules. A development triangle needs claims detail split by line and accident year — granularity public disclosure often does not give, so name the gap instead of spreading a total across it.',
|
|
1262
|
+
},
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
key: 'bankingCompliance',
|
|
1266
|
+
name: 'banking-compliance',
|
|
1267
|
+
label: { zh: '银行资本与流动性指标', en: 'Bank Capital Ratios' },
|
|
1268
|
+
description: {
|
|
1269
|
+
zh: '银行股最硬的几张表:CET1 / Tier 1 / 总资本充足率、风险加权资产及其权重结构、杠杆率与 LCR / NSFR,加一套"违约打进来后资本够不够"的压力形状。',
|
|
1270
|
+
en: 'The hardest numbers on a bank name: CET1 / Tier 1 / total capital adequacy, risk-weighted assets and their weight structure, the leverage ratio, LCR and NSFR, plus a pass that asks whether capital still holds once defaults arrive.',
|
|
1271
|
+
},
|
|
1272
|
+
owner: 'GAJETOso',
|
|
1273
|
+
repository: 'financeskills',
|
|
1274
|
+
status: 'watchlist',
|
|
1275
|
+
lastCommit: '2026-10-01',
|
|
1276
|
+
reviewBy: '2026-11-15',
|
|
1277
|
+
tags: ['risk', 'financial-health', 'macro'],
|
|
1278
|
+
riskNote: {
|
|
1279
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。阈值按巴塞尔原值写(4.5% / 6% / 8%):中国大陆适用《商业银行资本管理办法》,核心一级最低 5% 之上还有储备资本与系统重要性附加,资本定义与风险权重也另有表——这颗的比率形状可以用,数字只能当境外参照,不能当境内合规判断。风险权重明细与 LCR 分项在 A 股年报里的披露粒度不一,取不到就点名缺口。',
|
|
1280
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. Its thresholds are Basel originals (4.5% / 6% / 8%): mainland China applies the Capital Rules for Commercial Banks, where the 5% minimum CET1 sits on top of a conservation buffer and system-importance add-ons, and capital definitions and risk-weight tables differ again. Use the ratio shapes, treat the numbers as an overseas reference, and never as a domestic compliance judgement; risk-weight and LCR detail varies by filing, so missing lines are named as gaps.',
|
|
1281
|
+
},
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
key: 'forensicAccounting',
|
|
1285
|
+
name: 'forensic-accounting',
|
|
1286
|
+
label: { zh: '账务异常与数字分布排查', en: 'Forensic Ledger Screening' },
|
|
1287
|
+
description: {
|
|
1288
|
+
zh: '拿账和数字做取证式排查:首位数字的 Benford 分布检验、整数与重复金额、资金循环路径、供应商与关联方重合,并把结论写成一条经得起复核与质询的证据链。',
|
|
1289
|
+
en: 'Screens a ledger forensically: Benford first-digit tests, round-number and repeated-amount patterns, round-trip flows, vendor and related-party overlaps — written up as an evidence chain that can survive review and cross-examination.',
|
|
1290
|
+
},
|
|
1291
|
+
owner: 'GAJETOso',
|
|
1292
|
+
repository: 'financeskills',
|
|
1293
|
+
status: 'watchlist',
|
|
1294
|
+
lastCommit: '2026-10-01',
|
|
1295
|
+
reviewBy: '2026-11-15',
|
|
1296
|
+
tags: ['verification', 'risk', 'financial-health'],
|
|
1297
|
+
riskNote: {
|
|
1298
|
+
zh: '冷启动实验;上游最近一次提交是 2026-10-01,启用前请自行复核来源。除首位数字检验可以只对公开报表做以外,这颗的主要路径(银行流水、员工与供应商信息比对、企业内部系统)需要使用者自己提供账务明细:本插件不连企业内部系统,也没有那些数据源。它给出的"疑似"清单是排查线索,不是舞弊认定,也不构成审计或法律意见;样本量不足时首位数字检验本身不成立,正文的门槛要照做。',
|
|
1299
|
+
en: 'Cold-start experiment; upstream last moved on 2026-10-01, so review the sources before use. Only the first-digit test can run on published statements; the rest of this skill\u0027s paths — bank statements, employee-versus-vendor matching, internal ERP systems — require the user to supply the accounting detail, since this plugin connects to no corporate system and holds no such source. What it returns is a list of leads, not a fraud finding, and neither an audit nor a legal opinion; a Benford test on too small a sample is void, and the sample thresholds in the text stand.',
|
|
1300
|
+
},
|
|
1301
|
+
},
|
|
1147
1302
|
])
|
|
1148
1303
|
|
|
1149
1304
|
export const SELECTED_SKILL_TAG_LABELS = Object.freeze({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KOMVIA
|
|
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,202 @@
|
|
|
1
|
+
# Upstream Record
|
|
2
|
+
|
|
3
|
+
- Project: FinanceSkills —— 48 颗讲**企业会计与公司金融**的 skill:估值与建模(WACC、三表勾稽、DCF 与
|
|
4
|
+
可比与先例交易、LBO、初创估值、油气储量)、信用与减值(偿债能力、IFRS 9 预期信用损失、银行资本、
|
|
5
|
+
保险准备金)、编制视角的会计作业(收入确认、租赁、递延所得税、合并、存货、固定资产、总账分录、
|
|
6
|
+
结账与对账)、审计内控(内审清单、SOX 404、取证排查、ESG 披露)、企业内部运营(FP&A、单位经济、
|
|
7
|
+
盈亏平衡、司库、项目挣值、燃烧率),以及 6 颗个人理财与美国 / 英国税制那颗。上游 `README.md:5`
|
|
8
|
+
自述目标用户是 **accountants**("for accountants in oil & gas, banking, insurance, and corporate
|
|
9
|
+
finance"),这一句正是本颗收录判断的落点:使用者是证券研究者,不是记账的人。
|
|
10
|
+
- Repository: https://github.com/GAJETOso/financeskills
|
|
11
|
+
- Upstream commit: `b0c6239e339c1865c54bd2bb4cd4c1974120f1b8`(main,2026-10-01 12:08:42 +0000,
|
|
12
|
+
"chore: refresh eval baseline scorecard")
|
|
13
|
+
- 全仓 46 次提交,首末为 2026-05-01 与 2026-10-01;`chore: refresh eval baseline scorecard` 按月出现,
|
|
14
|
+
是唯一持续的活动线。上游 `VERSIONS.md` 停在 v1.0.1(2026-06-12),`marketplace.json` 的 `version`
|
|
15
|
+
同为 `1.0.1`,无 git tag、无 GitHub release。
|
|
16
|
+
- License: MIT;`LICENSE` 为上游原件、未改写。署名按现状记三条,不替上游挑一个:
|
|
17
|
+
`LICENSE` 的版权行是 **`Copyright (c) 2026 KOMVIA`**;`marketplace.json` 的 `publisher` 也是 `KOMVIA`,
|
|
18
|
+
上游 `AGENTS.md:11` 自述 `**Creator**: KOMVIA`;而仓库 owner 与 `README.md:5` 的 "Built by" 都是
|
|
19
|
+
**Ayotunde Oso(账号 `GAJETOso`)**。catalog 的 `owner` 用仓库账号 `GAJETOso`——设置卡片那条
|
|
20
|
+
上游链接是按 `https://github.com/${owner}/${repository}` 拼的(`capital-config/client.src.cjs:576`),
|
|
21
|
+
换成品牌名就是死链。MIT 与 Apache-2.0 的差别在本仓有实际后果,见下面"许可义务"一节。
|
|
22
|
+
- Imported content: 只带 `skills/` 这一棵树(48 颗,337 个文件 / 2.4 MB)与 `LICENSE` 原件,
|
|
23
|
+
与所钉 commit 逐字节相同(除下面列出的 10 份)。**上游仓库根其余材料整个不复制进本仓**,
|
|
24
|
+
不是"复制了再挡":`tools/`(2.2 MB,MCP 服务端 + Stripe / Plaid / QuickBooks / Xero 连接器——
|
|
25
|
+
执行面,连 git 都不进)、`standards/`(924 KB 准则摘要库)、`commands/`(斜杠命令层)、
|
|
26
|
+
`projects/`、`compliance/`、`foundations/`、`ai-usage/`、`workflows/`、`financeskills_pkg/`(它自己的
|
|
27
|
+
python 包与 CLI)、`validate_skills.py` 与两份 validate 脚本、`MANIFEST.sha256`、`SKILL_MATRIX.md`、
|
|
28
|
+
`VERSIONS.md`、`marketplace.json`、`pyproject.toml`、`llms.txt` 与 12 份仓库级文档、`.claude-plugin/`、
|
|
29
|
+
`.github/`。判据:正文从不跨目录引用它们——48 颗的 175 条相对链接**全部**落在自己目录内,
|
|
30
|
+
`../` 命中 **0 处**(实测,见"复核方法")。上游 `.gitignore` 同样不带(§8.6:它会继续在本仓生效)。
|
|
31
|
+
- Structure: **前六颗挨个踩过的四类结构改动,这一颗一处都不需要**——上游本来就是
|
|
32
|
+
`skills/<name>/SKILL.md` 一层扁平,48 份 frontmatter 的 `name` 与目录名逐颗一致(因此
|
|
33
|
+
`test/persona.test.mjs` 的 frontmatter 核对直接过),`description` 齐备,既不用补 `name`、
|
|
34
|
+
不用套一层、不用平铺主题分组、也不用在多根里挑一条。catalog 的 `name` 与现有 59 颗**零撞名**。
|
|
35
|
+
|
|
36
|
+
- Local modifications(两类,逐条可复核;口径与理由见 `docs/dev/selected-skills.md` §8.6 的接入必查清单):
|
|
37
|
+
|
|
38
|
+
1. **合规改写:8 颗 catalog 正文里的 16 处,涉及 10 份文件(+16 / −16 行)**。全部落在第 1、4 两条,
|
|
39
|
+
按类别列在这里:
|
|
40
|
+
|
|
41
|
+
- **`python3 scripts/calculate.py` 那一句(8 处,每颗 SKILL.md 的 `## Scripts` 段各一行)**——
|
|
42
|
+
上游 48 份正文里有 43 份带着这句,写法是 `Run \`python3 scripts/calculate.py\` to self-test;
|
|
43
|
+
import the functions instead of doing mental math`,而同文件里**没有任何一份**写着"没有 shell
|
|
44
|
+
时读哪份附属文件"的退路句(实测命中 0)。本插件的根角色没有 shell(§1.6 两道闸门 deny
|
|
45
|
+
`bash` / `pwsh`),发布包也不带脚本,这一句撞上的是一条跑不通的指令。改法照 trading-skills
|
|
46
|
+
先例:删掉"你自己跑",逐颗点名"照哪几份 `references/` 的算式做、把算式写进答复、真要算力就
|
|
47
|
+
交给委派的 `data_junior`"。八颗各自点名的附属文件:`company-valuation` →
|
|
48
|
+
`references/terminal-value-guide.md`;`wacc-computation` → `references/capm-basics.md` 与
|
|
49
|
+
`references/beta-math.md`;`three-statement-modeling` → `references/model-checks.md`;
|
|
50
|
+
`credit-analysis` → `references/covenant-guide.md`;`ecl-computation` →
|
|
51
|
+
`references/risk-modeling.md` 与 `references/ifrs9-standard.md`;`insurance-reserving` →
|
|
52
|
+
`references/actuarial-methods.md` 与 `references/insurance-metrics.md`;`banking-compliance` →
|
|
53
|
+
`references/basel-iii-framework.md` 与 `references/risk-weights.md`;`forensic-accounting` →
|
|
54
|
+
`references/benfords-law.md`。
|
|
55
|
+
- **"用代码算"这一族(4 处)**:`company-valuation:45`(`**Build with code**: FCF model,
|
|
56
|
+
sensitivity grid …`)、`three-statement-modeling:50`(`**Build in code** (pandas or a clean
|
|
57
|
+
spreadsheet structure) …`——同时点了 pandas 与电子表格引擎)、`credit-analysis:48`
|
|
58
|
+
(`**Compute ratios with code** …`)与 `credit-analysis:62`(输出模板里的
|
|
59
|
+
`with code-verified math`)。这四句都在指挥 Agent"用代码把数算出来",而本插件的分析侧唯一有
|
|
60
|
+
shell 的是被委派的 `data_junior`,根角色算数只能把算式写出来。改成同一条形状,不动它们给出的
|
|
61
|
+
公式、阈值与判断标准。
|
|
62
|
+
- **附属文件里的同类残留 1 处**:`three-statement-modeling/references/model-checks.md:23`
|
|
63
|
+
写着 `In code: a single CONFIG dict/dataclass, statements as functions of it`——把模型组织成代码
|
|
64
|
+
的指令。改成"只留一个驱动因子块,每张报表都从它派生",意思不丢。**扫描面必须含附属文件**这一条
|
|
65
|
+
是第四颗教的(§8.6 开头那段),这次照样在 `references/` 里抓到一处。
|
|
66
|
+
- **产出物里的假出处 1 处**:`wacc-computation/assets/wacc-memo-template.md:40` 的脚注
|
|
67
|
+
`Computed with scripts/calculate.py` 会在每张备忘录上宣称"这些数是一个脚本算出来的"——在
|
|
68
|
+
本插件里没有任何脚本跑过,这是一句运行时假话。改为"每个数字都对得上它旁边写出的算式与输入",
|
|
69
|
+
保留后半句 `review before use in a transaction`。
|
|
70
|
+
- **点名宿主工具 1 处(2 行)**:`forensic-accounting:29-30` 原句
|
|
71
|
+
`**\`web_fetch\` and generic scraping cannot access secure banking portals or private ERP
|
|
72
|
+
environments.**` 加后半句"…or via specific API integrations"。这句**本意是护栏**(提醒 Agent
|
|
73
|
+
别以为抓得到银行内网),但两半都有问题:前半句点名了一颗本插件根角色没有的工具名,后半句承诺了
|
|
74
|
+
一个本插件不提供的企业接口集成。改写为"本插件的任何检索路径——包括委派出去的——都到不了银行
|
|
75
|
+
门户、企业 ERP 或任何内部系统,账务明细只能由使用者给出",护栏含义原样保留。
|
|
76
|
+
⚠ 这一处是本轮最容易"过了闸门却改坏内容"的地方:闸门只认词形,`web_fetch` 从来不在 23 条模式里。
|
|
77
|
+
|
|
78
|
+
2. **判定过、但按"不改"处理的**(记在这里,因为下一轮重新按 commit 覆盖快照时会有人以为漏改):
|
|
79
|
+
- `three-statement-modeling/references/model-checks.md:16` 的 `in Excel requires iterative calc …
|
|
80
|
+
in Python, loop until |Δinterest| < tolerance`:**留着**。这是在讲循环引用两种解法各自的
|
|
81
|
+
代价(并明确写了 "risk: silent convergence failures"),属方法论描述,不是一句"你去跑"的指令。
|
|
82
|
+
同文件 `:22` 的 `Color convention if spreadsheet-based` 同理(呈现惯例)。
|
|
83
|
+
- `## Related Skills` 段里那些**指向不进 catalog 的兄弟**的名字(`financial-analysis`、
|
|
84
|
+
`risk-assessment`、`lbo-modeling`、`startup-valuation`、`investment-analysis`、`budget-forecast`、
|
|
85
|
+
`working-capital-analysis`、`debt-restructuring`、`corporate-consolidation`、`audit-checklist`):
|
|
86
|
+
**留着,逐字不动**。这些 skill 随包住在快照里,只是没进闭集,运行时会得到一次"没开放"的答复——
|
|
87
|
+
已收录的正文里本来就有 26 处同形状(InvestSkill 的 `fact-check → full-report`、
|
|
88
|
+
`industry-map → chart-master` 等),不为口味改上游的交叉引用。
|
|
89
|
+
- 另外三个名字**指向的 skill 连上游都不存在**(`wacc-computation` 的 `capital-budgeting`;
|
|
90
|
+
`ecl-computation` 与 `insurance-reserving` 的 `financial-statement-prep`——上游那颗真名叫
|
|
91
|
+
`statement-preparation`,八成是改名后没回来更新)。这是上游自身缺陷,不属"合规 / 可发现性"
|
|
92
|
+
两个可改理由,因此**也不改**,只记在这里;表现与上一条完全相同。
|
|
93
|
+
- 巴塞尔的 4.5% / 6% / 8%、`credit-analysis` 的杠杆 3.0x 与 DSCR 1.2x、`company-valuation` 的
|
|
94
|
+
"TV > 75% of EV 报警"与"DCF 与可比差 30% 说明假设有错"、控制权溢价 20–35%、
|
|
95
|
+
`ecl-computation` 的 `Loss Allowance Posting (Generating the journal entry)`——**一个数字、
|
|
96
|
+
一句结论都没动**(§8.6:不改分析结论)。它们与市场口径有关的偏差全部改在 catalog 的
|
|
97
|
+
`description` 与 `riskNote` 上说明,见下面"市场口径落点"。
|
|
98
|
+
|
|
99
|
+
- 许可义务:MIT 与 Apache-2.0 在这点上不同,别混淆。Apache-2.0 第 4 条 (b) 款要求"修改过的文件带上
|
|
100
|
+
显著声明",所以第六颗(`claude-for-financial-services-cn`)每份被改写的正文第一行都有一句可见声明,
|
|
101
|
+
并由 `test/selected-skills-content.test.mjs:132-143` 按 `repository` 正向钉住。**本颗是 MIT**:
|
|
102
|
+
再分发不要求在被打的那份文件上留痕,改动口径住在本文件就够了——所以这 8 份正文**没有**加声明行,
|
|
103
|
+
那也不是遗漏。将来若有 Apache-2.0 的快照照本文件抄格式,别忘了那一句是许可义务而不是本仓习惯。
|
|
104
|
+
|
|
105
|
+
- 脚本审计("允许 skill 自带脚本"这条政策的实测底子,翻案时直接用):43 份 `scripts/calculate.py`,
|
|
106
|
+
共 2002 行,逐份读过。顶层 import 只有 `__future__`、`copy`、`dataclasses`、`itertools`、`math`、
|
|
107
|
+
`random`、`statistics`、`typing`——**全部标准库**;零网络调用、零文件读写、零 `subprocess` /
|
|
108
|
+
`os.system` / `eval` / `exec`、零 `os.environ` 与凭据读取;每份末尾的 `if __name__ == "__main__":`
|
|
109
|
+
是一组 `assert` 自检加一行打印。上游自带 `MANIFEST.sha256`(580 条),实测 **38 份脚本哈希与清单一致、
|
|
110
|
+
0 份不符**;5 份不在清单内(`personal-budgeting`、`tax-efficient-investing`、`debt-payoff`、
|
|
111
|
+
`net-worth-tracker`、`retirement-planning`),上游 `VERSIONS.md` 自述"38/43 covered; remaining 5
|
|
112
|
+
judgment-only by design"。**风险不在恶意,在"这条指令跑不通"**:正文写的是相对路径 `scripts/…`,
|
|
113
|
+
而 DSH 的 `skill` 工具会在结果里给一行 `<skill_resources>` 与"Base directory for this skill:
|
|
114
|
+
<绝对路径>"(本仓真实会话里取到两例),所以路径其实可解析——真正的约束是谁来执行:根角色被
|
|
115
|
+
`ROOT_AGENT_DENIED_TOOLS` 与 `src/agents/bash-guard.ts` 两道闸门挡掉 shell,唯一有 shell 的
|
|
116
|
+
`data_junior` 看不到 skills(provider 只在 Capital 根 Agent scope 注册)。因此翻案需要同时动
|
|
117
|
+
§8.6 第 4 条、闸门 `NEEDS_FALLBACK`(现要求 `skip the router` 那一句)与这颗的 `.npmignore`
|
|
118
|
+
(现在挡 `scripts`),并把 `python3` 在 Windows 桌面端不保证存在这一条写成退路而不是装饰。
|
|
119
|
+
**本轮按现行口径执行,脚本不进发布包。**
|
|
120
|
+
|
|
121
|
+
- 收录判断(48 颗里 **8 颗进 catalog,40 颗留在快照里当可审查材料**):
|
|
122
|
+
- **进(8)**:`company-valuation`、`wacc-computation`、`three-statement-modeling`、`credit-analysis`、
|
|
123
|
+
`ecl-computation`、`insurance-reserving`、`banking-compliance`、`forensic-accounting`。
|
|
124
|
+
依据是在已收录 59 颗的正文上按中英双语现算的空白核对(宇宙 = catalog 条目目录下的全部 `.md`,
|
|
125
|
+
与闸门同一口径):**EV→股权价值 bridge、敏感性网格、三表勾稽与 revolver 循环、PD/LGD/ECL 三阶段、
|
|
126
|
+
Benford 首位数字、mid-year convention 六项 0 命中**;CET1 / RWA / LCR、IBNR / 综合成本率、
|
|
127
|
+
DuPont、先例交易、控制权溢价各只有 1 颗顺带提过;CAPM 与 β 去杠杆各 2 颗——**都点名了,都没有估法**。
|
|
128
|
+
- **不进 · 与既有重叠(4)**:`financial-analysis`(比率与 DuPont 已被 `stock-eval`、
|
|
129
|
+
`financial-report-analyst`、`financial-health` 覆盖)、`investment-analysis`(与
|
|
130
|
+
`stock-eval`、`buffett-investment-framework`、`peter-lynch-skill` 同一件事且更薄)、
|
|
131
|
+
`risk-assessment`(VaR / 压力测试已有 `risk-stress-test` 与 `portfolio-concentration`)、
|
|
132
|
+
`working-capital-analysis`(现金周期 7 颗已覆盖,含 A 股那几颗)。
|
|
133
|
+
- **不进 · 资产类别(1)**:`crypto-accounting`。本插件不涉及比特币与数字资产,这条与合规判据无关,
|
|
134
|
+
是服务边界。连带 `tools/connectors/`(Stripe / Plaid 等账户连接)整个不进 git。
|
|
135
|
+
- **不进 · 个人理财与美国 / 英国税制(6)**:`personal-budgeting`、`net-worth-tracker`、
|
|
136
|
+
`retirement-planning`、`debt-payoff`、`tax-planning`、`tax-efficient-investing`(401k vs Roth、
|
|
137
|
+
ISA allowance 是境外税制产物)。使用者是这个投研插件的使用者,不是家庭财务规划的客户。
|
|
138
|
+
- **不进 · 编制视角的会计作业(13)**:`journal-entry`、`statement-preparation`、
|
|
139
|
+
`intercompany-accounting`、`corporate-consolidation`、`close-management`、`automated-reconciliation`、
|
|
140
|
+
`deferred-tax`、`revenue-recognition`、`lease-accounting`、`inventory-costing`、
|
|
141
|
+
`fixed-asset-accounting`、`aro-computation`、`variance-analysis`。这一族的正文是"你是总账会计 /
|
|
142
|
+
集团财务报告会计 / 工厂成本控制员",把账做对;本插件的使用者读别人披露的账。**收法上我们没有
|
|
143
|
+
"把编制视角改写成审阅视角"这一项授权**(§8.6:不为口味改措辞、不改分析结论),所以整族留在材料里。
|
|
144
|
+
- **不进 · 审计、内控与披露合规执行(3)**:`audit-checklist`、`sox-compliance`、`esg-reporting`
|
|
145
|
+
(SOX 404 控制测试与抽样、COSO 框架、SASB / TCFD 披露准备——执行面在上市公司自己,且本插件
|
|
146
|
+
没有 ESG 数据面)。
|
|
147
|
+
- **不进 · 企业内部经营与资金管理(6)**:`budget-forecast`、`predictive-burn-rate`、
|
|
148
|
+
`product-profitability`、`cvp-breakeven`、`treasury-management`、`earned-value-mgmt`。
|
|
149
|
+
- **不进 · 私有公司与特殊融资语境(5)**:`startup-valuation`(Berkus / VC 法,无披露可校)、
|
|
150
|
+
`lbo-modeling`、`venture-debt`、`debt-restructuring`(Chapter 11 谈判)、`oil-gas-valuation`
|
|
151
|
+
(储量经济学)。本插件没有非上市标的与储量报告的取数面。
|
|
152
|
+
- **不进 · 依赖本插件不具备的模型或数据形态(2)**:`ai-anomaly-detection`、
|
|
153
|
+
`nlp-earnings-sentiment`(正文的 `references/finbert-guide.md` 里那段 ```python 围栏用
|
|
154
|
+
`from transformers import pipeline`;本插件既没有 shell,宿主侧也不带 transformers)。
|
|
155
|
+
这两份围栏同时是 23 条模式在**全 48 颗**上唯一的命中(另一处是
|
|
156
|
+
`automated-reconciliation/references/fuzzy-logic.md`),正因为不收,它们不进扫描面。
|
|
157
|
+
|
|
158
|
+
- 市场口径落点(§8.6 第 8 条):`us-stock` 只给**数字基准确实是美国**的三颗——`wacc-computation`
|
|
159
|
+
(10 年期美债、美股 ERP、美国边际税率)、`company-valuation`(先例交易与控制权溢价惯例)、
|
|
160
|
+
`credit-analysis`(国际公司贷款的舒适阈值)。`banking-compliance`(巴塞尔原值)、`ecl-computation`
|
|
161
|
+
(IFRS 9)、`insurance-reserving`(IFRS 17 与精算惯例)、`three-statement-modeling`(IFRS / US GAAP
|
|
162
|
+
科目表)、`forensic-accounting` **不套 `us-stock`**——它们是国际准则而不是美股专用,标错会把
|
|
163
|
+
A 股能用的东西藏起来;差异逐颗写进 `riskNote`:境内商业银行资本办法的 5% + 储备资本 + D-SIB 附加、
|
|
164
|
+
CAS 22 已对齐 IFRS 9 但不披露 PD / LGD 参数、境内法定准备金与折现曲线另有规定、A 股科目要自己映射。
|
|
165
|
+
|
|
166
|
+
- 复核方法(全部是实测命令,不是回忆):
|
|
167
|
+
1. `git clone` 所钉 commit 到 `/tmp`,`diff -rq` 上游 `skills/` 与快照 `skills/` ⇒ 差异
|
|
168
|
+
**恰好 10 份文件**(8 份 `SKILL.md` + `three-statement-modeling/references/model-checks.md` +
|
|
169
|
+
`wacc-computation/assets/wacc-memo-template.md`),其余 38 颗逐字节相同;`git diff --no-index
|
|
170
|
+
--numstat` 逐份取行数,合计 **+16 / −16**。
|
|
171
|
+
2. 把 `test/selected-skills-content.test.mjs` 的 23 条 FORBIDDEN **原文正则**套到全 48 颗的 185 份
|
|
172
|
+
`.md` 上现扫 ⇒ 命中 2 处(都不在候选里);另按 `python3 scripts/` 数出 43 份、按退路句族
|
|
173
|
+
(`skip the router` / `no shell` / `without a shell`)数出 **0 份**。
|
|
174
|
+
3. `sha256sum -c MANIFEST.sha256`:580 条里 52 条不匹配,**全部是 `evals/` 下的 CSV 夹具与
|
|
175
|
+
`tools/evals/BASELINE.md`、`compliance/REGULATORY_MAPPING.md`**;43 份脚本零不匹配(38 对、5 不在清单)。
|
|
176
|
+
不推断成因,只记事实。
|
|
177
|
+
4. 链接与结构:48 份 frontmatter 的 `name` 与目录名逐一相等;175 条相对 `.md` 链接全部指向存在的
|
|
178
|
+
文件;`../` 跨目录引用 0 处;`skills/` 下的子目录名只有 `references` / `evals` / `scripts` /
|
|
179
|
+
`assets` / `files` 五种,与上游仓库根那批目录名零冲突(这一条决定 `.npmignore` 的裸名规则会不会
|
|
180
|
+
误挡正文——见 packaging 那一节)。
|
|
181
|
+
5. 空白核对按 catalog 现算:把候选主题的英文与中文两套词表同时套到已收录 59 颗的正文上(**只用
|
|
182
|
+
英文词表会把中文写的 A 股正文误判成空白**,这是这一轮差点犯下的错)。
|
|
183
|
+
|
|
184
|
+
- Packaging: 这颗带 `.npmignore`,两条裸名规则:`evals`(48 份评测夹具目录,896 KB——`evals.json` 与
|
|
185
|
+
CSV 样本;**八颗的 `SKILL.md` 都不链接 `EXAMPLE.md`,而 `EXAMPLE.md` 是唯一提到 `evals/files/*.csv`
|
|
186
|
+
的地方**,所以运行时读不到它们,`provider` 也只读 `SKILL.md`)与 `scripts`(43 份 `calculate.py`,
|
|
187
|
+
344 KB;本轮按 §8.6 第 4 条不进包,理由与审计数字见上面"脚本审计"一节,政策若翻案这条第一个要改)。
|
|
188
|
+
随包发的是 48 颗的运行时正文(`SKILL.md` + `references/` + `assets/` + `EXAMPLE.md`)与本文件、
|
|
189
|
+
`LICENSE`。规则写成裸名不带路径(`test/packaging.test.mjs` 把目录与文件两类规则都拿去问一次真实
|
|
190
|
+
打包器,写了没生效就红;反过来"该挡的没写"没有任何测试会响,所以 `npm pack --dry-run` 的抽查是
|
|
191
|
+
这一步的收尾)。全量快照完整住在 git,`github:` 安装与"当时是哪个 commit"的复核都不受影响。
|
|
192
|
+
|
|
193
|
+
- Runtime status: `watchlist` / 默认关闭的显式实验。只有使用者在「插件」→ Capital Generation →「配置」
|
|
194
|
+
逐格打开后,对**之后新建**的 Capital 根 Agent 可见;子 Agent 不继承。开启与否都不引入新权限:
|
|
195
|
+
这 8 颗正文从不取数、不跑脚本、不连任何系统,需要的数字一律走本插件既有的委派取数通道,
|
|
196
|
+
取不到就点名缺口。
|
|
197
|
+
- Review status: 2026-10-12 收录并复查上游、许可证、脚本与维护状态;下次复核 **2026-11-15**。
|
|
198
|
+
这 48 颗按 IFRS / US GAAP 的企业财务惯例写(科目名、准则号、巴塞尔阈值、401k 与 ISA 那类税制),
|
|
199
|
+
与本仓已有的美股 28 颗和 A 股 18 颗互为**方法层补充**而不是同一件事的第四份。本插件不提供金融服务:
|
|
200
|
+
这 8 颗算出的 WACC、估值区间、偿债结论、减值覆盖、准备金与资本比率都是方法推演的产物,
|
|
201
|
+
既不是订单,也不是授信意见、审计意见或法律意见——`forensic-accounting` 那颗给出的"疑似"清单尤其
|
|
202
|
+
不构成舞弊认定。本文件与本仓的收录判断不构成对上游观点的背书。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - ai-anomaly-detection
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> We have 1 million credit card transactions. We want to find weird spending patterns that don't follow our standard rules. Which ML model should we use?
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Should recommend unsupervised learning models like Isolation Forest or Autoencoders. Should explain why these are better than rules-based systems for large datasets. Should mention feature engineering (e.g. txn frequency, distance). Should provide an AI Audit Report structure.
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/expense_ledger.csv`:
|
|
14
|
+
|
|
15
|
+
> Screen the attached expense ledger (evals/files/expense_ledger.csv) for anomalies using at least two methods (z-score and IQR). Report flagged rows with their references and quantify how extreme each is.
|
|
16
|
+
|
|
17
|
+
Expected: Two planted anomalies: GL-4057 (290.00, high) and GL-4101 (12.00, low). Z-score flags indices [57, 101].
|
|
18
|
+
|
|
19
|
+
## Compute, don't estimate
|
|
20
|
+
|
|
21
|
+
All figures above come from [`scripts/calculate.py`](./scripts/calculate.py) - import its functions rather than doing arithmetic in prose.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-anomaly-detection
|
|
3
|
+
description: When the user wants to use machine learning to detect fraud, errors, or unusual patterns in high-volume financial data. Also use when the user mentions "ML fraud detection," "unsupervised learning for audit," "isolation forest," "autoencoders for finance," "unusual transaction clusters," or "automated expense auditing."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AI Anomaly Detection
|
|
9
|
+
|
|
10
|
+
You are an AI Financial Systems Engineer. Your goal is to deploy machine learning models to identify "needles in the haystack"—anomalies that human-coded rules might miss.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **Data Volume & Velocity**
|
|
15
|
+
- How many transactions are we analyzing? (e.g., 10,000 vs 10,000,000).
|
|
16
|
+
- Is the data structured (CSV/SQL) or semi-structured (JSON logs)?
|
|
17
|
+
|
|
18
|
+
2. **Anomaly Definition**
|
|
19
|
+
- Are we looking for "Point Anomalies" (one weird transaction)?
|
|
20
|
+
- "Contextual Anomalies" (weird for this specific user/time)?
|
|
21
|
+
- "Collective Anomalies" (a series of transactions that are weird together)?
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## AI Framework
|
|
26
|
+
|
|
27
|
+
### Technical Limitation
|
|
28
|
+
**LLMs are not ML Models.**
|
|
29
|
+
While LLMs (like Claude/GPT) can reason about small sets of anomalies, for millions of rows, you should use specialized Python libraries (Scikit-Learn, PyOD). This skill provides the *logic* and *code* for those implementations.
|
|
30
|
+
|
|
31
|
+
### Priority Order
|
|
32
|
+
1. **Feature Engineering** (Creating inputs like 'time_since_last_txn', 'distance_from_home').
|
|
33
|
+
2. **Unsupervised Learning** (Isolation Forest, Local Outlier Factor).
|
|
34
|
+
3. **Cluster Analysis** (K-Means to identify unusual spending groups).
|
|
35
|
+
4. **Scoring & Flagging** (Assigning a "Risk Score" to every row).
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Technical AI Steps
|
|
40
|
+
|
|
41
|
+
### 1. Isolation Forest Implementation
|
|
42
|
+
- Use the `IsolationForest` algorithm to isolate observations by randomly selecting a feature and a split value.
|
|
43
|
+
- Anomalies are the points that require fewer splits to isolate.
|
|
44
|
+
|
|
45
|
+
### 2. Autoencoder Analysis (Advanced)
|
|
46
|
+
- Train a neural network to compress and reconstruct "normal" data.
|
|
47
|
+
- High "Reconstruction Error" identifies anomalies that don't fit the normal pattern.
|
|
48
|
+
|
|
49
|
+
### 3. Feature Scaling
|
|
50
|
+
- Apply `StandardScaler` or `MinMaxScaler` to ensure transaction amounts don't overwhelm other features (like frequency).
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Output Format
|
|
55
|
+
|
|
56
|
+
### AI Audit Report Structure
|
|
57
|
+
|
|
58
|
+
**Model Performance**
|
|
59
|
+
- Anomaly rate detected (e.g., 0.5% of total data).
|
|
60
|
+
- Top features driving the anomaly score.
|
|
61
|
+
|
|
62
|
+
**The Flags**
|
|
63
|
+
- Top 20 "High Risk" transactions with confidence scores.
|
|
64
|
+
- "Why this was flagged" (e.g., "Unexpected high value for this vendor category").
|
|
65
|
+
|
|
66
|
+
**Python Integration**
|
|
67
|
+
- Ready-to-run script for the user to execute against their full dataset.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Scripts
|
|
72
|
+
- [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations. Run `python3 scripts/calculate.py` to self-test; import the functions instead of doing mental math.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## References
|
|
77
|
+
- [Anomaly Detection Algorithms](./references/ml-algorithms.md): Isolation Forest vs. LOF.
|
|
78
|
+
- [Feature Engineering for Finance](./references/feature-engineering.md): Key inputs for fraud models.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Related Skills
|
|
83
|
+
- **forensic-accounting**: To manually investigate the flags raised by the AI.
|
|
84
|
+
- **audit-checklist**: To integrate AI detection into the standard audit flow.
|