Repository navigation
Home
This page is generated from
docs/README.mdin the repository --docs/is the canonical documentation. Direct wiki edits here are overwritten on the next publish; make changes indocs/by pull request.
The detailed, human-facing documentation. The project README is the landing page; this folder is
the reference. CLAUDE.md is a different thing: the operating rules and engineering contracts that
Claude Code follows when it works in this repository.
| If you want to... | Read |
|---|---|
| Understand how the pieces fit together, and the difference between running through Claude Code and running the Python scripts | Architecture |
| Walk through a deal end to end with worked examples | Workflows |
| Look up what a slash command asks for and writes | Command reference |
| Understand the collateral calculation workflow, its inputs, workbook outputs and policy use | Collateral analysis |
| Use the analyst aids (information gaps, evidence audit, reading financials, policy fit, credit challenge and credit-risk review) | Skills |
| Know what a Claude Code skill may and may not be in this repository, and which are planned | Skill design |
| Understand the figures: ratios, covenants, the policy engine, spreading | Financial model and policy engine |
Understand state.json, source manifests and persisted conventions |
Data model |
| Run or script the tools | CLI reference |
| Customise templates or understand the exported documents | Outputs and templates |
| Know where credentials go and which settings do anything | Configuration |
| Run the tests, understand CI, coverage and mutation testing | Testing and CI |
| Know what must never be committed, and what the security layers are | Security and confidentiality |
| Judge how far a generated memo can be trusted, and on what evidence | AI assurance |
| Understand the local live-model evaluation harness | Evaluation |
| Change the repository: rules, sources of truth, what must stay green | Contributing |
| Record or read what an AI agent is doing on the repository: claims, status, outcomes, review findings | Agent ledger |
| Maintain it: verify, diagnose CI, triage mutation survivors, handle advisories, check readiness | Operations runbook |
| Fix an error message or a surprising result | Troubleshooting |
| Know why something is the way it is | Design decisions |
| See the product definition behind MVP v1 - problem, users, scope, requirements, acceptance criteria | MVP v1 PRD |
- An analyst using the framework: Architecture (the two ways to run it), Workflows, Command reference, then Troubleshooting when something surprises you. Financial model explains every figure.
- Someone deciding whether to trust the output: Architecture, then AI assurance, then Evaluation and the project status.
- A contributor: Contributing, Testing and CI, Security and Design decisions.
- Tracing a product decision to its delivery evidence: MVP v1 PRD for what was decided and why, then Design decisions for the principles behind it, then the pull requests each page cites.
- A maintainer: Operations runbook, with Testing and CI for what each check means and Evaluation before running anything that spends money.
The pages are listed in reading order: how it works, how to use it, what it produces, how it is checked, how it is changed and run, and why it is the way it is.
| Document | Contents |
|---|---|
| architecture.md | The idea, the two execution modes (authentication, billing, what stays local), the pipeline, where code ends and the model begins, and the annotated repository map |
| workflows.md | Worked synthetic examples: calibration, research, spreading, policy checking, assembly and export, review, resuming a deal |
| commands.md | The slash commands: inputs, outputs, state written, failure modes, cost and security |
| collateral.md | End-to-end collateral analysis: input ownership, deterministic calculation, recorded results, workbook columns, policy ground truth and RV sensitivity |
| skills.md | The analyst skills that ship with the framework: what each does and runs, what they never do, and how to use them safely |
| skill-design.md | Skills: the taxonomy, how they are invoked, why none is input to the Maker or the Checker, the single command-and-skill inventory, the planned first tranche and what is deferred |
| financial-model.md | Financial terms and ratios with worked numbers, N/A and UNRESOLVABLE, covenants, the downside case, what the policy engine decides |
| formula-register.md | The reviewable page of every computed metric: formula, unit, edge rules, implementation reference, basis and status, per stable F-NNN id |
| rules-register.md | The policy-engine and checks rules, source and implementation references, and their test-coverage status by stable R-POL IDs |
| glossary.md | Short definitions of abbreviations and terms used in the UK credit workflows |
| data-model.md |
state.json, its keys and versioning, the two raw-figure stores, sources, persisted conventions |
| cli-reference.md | Every script's usage, flags, output and exit status; the headless pipeline |
| outputs.md | What a run produces: the .docx rendering rules, the workbook layout, the research brief, templates |
| configuration.md | Every config file and environment variable, which settings.json keys are read, credentials |
| testing.md | How the suite is organised and what a green run means, static analysis, coverage, CI, mutation testing, the test-count badge, the contract tests |
| security.md | The security layers and which are settings rather than files, what crosses a boundary, untrusted content, confidential paths, the PII scan |
| ai-assurance.md | What code guarantees, what the tests show, what the prompts only expect, what live evaluation has not shown, what stays with a person |
| evaluation.md | The evaluation harness: what it can and cannot show, reading a result, baselines, cost and safety, how its runner works |
| contributing.md | Sources of truth, keeping documentation aligned, synthetic data, confidentiality, testing expectations, state compatibility, snapshots, security review, prompt-change boundaries, pull-request sequencing |
| agent-ledger.md | How AI agents record their work on issue #245: the CLAIM, STATUS and OUTCOME entries, evidence marks, finding ids, independent review, and what an entry never contains |
| operations.md | The maintainer runbook: full-suite verification, the badge, diagnosing CI, coverage and mutation reports, dependencies and advisories, documentation upkeep, live-evaluation boundaries, a readiness checklist |
| troubleshooting.md | Error messages, rejection reasons and surprising results, with fixes |
| decisions.md | The durable design decisions, each with context, choice, rationale and consequences |
| mvp-v1-prd.md | The product requirements behind MVP v1, reconstructed from its pull requests and decisions: problem, objectives, scope, requirements and acceptance criteria, validation status, risks and limitations, with the pull-request chronology in its own evidence appendix |
| move-ledger.md | Migration record: where every block of the old README and CLAUDE.md went |
Parts of these pages (marked at the point where they start) were moved from the README and CLAUDE.md rather than
rewritten; the examples on them are real runs of the synthetic deal in docs/examples/synthetic_co/, re-run by
the tests.
Documentation describes the system; it does not define it. When a page and its source disagree, the source wins and the page is a bug.
| Information | Authoritative source | Where it is explained |
|---|---|---|
| Command-line flags and their behaviour | The script itself (python scripts/<name>.py --help) |
CLI reference |
| Slash-command behaviour |
.claude/commands/*.md (the inventory in config/skills_registry.md) |
README.md, CLAUDE.md
|
| Which commands and skills exist, how each is invoked, and what a skill may be |
config/skills_registry.md, and .claude/skills/<name>/SKILL.md for each skill |
Skill design |
| Agent behaviour |
agents/underwriter_agent.md, agents/risk_reviewer_agent.md
|
Architecture |
| The interactive Checker (its tools and how it is started) |
.claude/agents/risk-reviewer.md and .claude/commands/review.md
|
AI assurance |
| Financial semantics | The implementation (scripts/spreading_builder.py, scripts/policy_engine.py, scripts/policy_checks.py) and its tests |
Financial model |
| State schema and versioning |
scripts/state_manager.py and its tests |
Data model |
| CI jobs and their rules |
.github/workflows/*.yml and tests/test_ci_workflow.py
|
Testing and CI |
| Tool settings, coverage floors, mutation scope | pyproject.toml |
Testing and CI |
| Security controls | The workflow files, .gitignore and the repository settings |
Security, CLAUDE.md
|
| Which settings are read | The code that reads config/settings.json
|
Configuration |
| The GitHub Wiki's content |
docs/ -- the wiki is generated from it and overwritten on every publish; never edit the wiki |
Operations |
| Rules Claude Code must follow when changing the repository | CLAUDE.md |
CLAUDE.md |
Some facts are repeated on purpose (a flag in a quick start, a rule in CLAUDE.md and the page that explains
it). A few of those repetitions are checked by tests, so a rename or removal fails CI with the file and line:
every --flag a document tells a reader to pass, every relative link and heading anchor, every Guideline N /
Audit Checklist item N reference, the headings that code and commands cite by name, the figures and messages the
worked examples quote, the inventory of commands and skills, the settings documented as read or inert, the CI jobs the pages
name, the repository paths they cite and the schema version the data-model page shows
(the contract tests).
As of 2026-10-09. No live model evaluation has produced a result: the harness is built, and the two one-call smoke-test attempts so far were rejected by the API for insufficient credit before any output, so there is no baseline (issue #151). The first successful run and first baseline are deliberate, manual steps, and prompt hardening is gated on them (issue #150). This section is the only dated status in the documentation; the evaluation guide describes how the harness works and does not depend on it.
- Change the source first, then the page that explains it, in the same pull request.
- Put a rule Claude Code must obey in
CLAUDE.md; put an explanation, example or reference here. - Use synthetic names and figures in examples (for instance "Synthetic Co",
0.20%); never real borrower data. - Do not add dated or volatile statements to evergreen pages; put them under Project status or in the tracking issue.
- A new page is linked from this index, or the link test fails.
This page is generated from
docs/README.mdin the repository --docs/is the canonical documentation. Direct wiki edits here are overwritten on the next publish; make changes indocs/by pull request.
- Home
- Architecture
- Workflows
- Slash command reference
- Collateral analysis
- Skills
- Skill design
- Financial model and policy engine
- Formula register
- Rules register
- Shared glossary
- Data model
- CLI reference
- Outputs and templates
- Configuration
- Testing and CI
- Security and confidentiality
- AI assurance
- Evaluation harness
- Contributing
- Agent ledger
- Operations runbook
- Troubleshooting
- Design decisions
- OpenCAM MVP v1 — product requirements document (reconstructed)
- Move ledger
Examples