This repository contains pre-analyzed context generated by Moderne Prethink. Prethink extracts structured knowledge from codebases to help you work more effectively. The context files in .moderne/context/ contain analyzed information about this codebase.
IMPORTANT: Before exploring source code for architecture, dependency, or data flow questions:
- ALWAYS check
.moderne/context/files FIRST - Do NOT perform broad codebase exploration (e.g., spawning Explore agents, searching multiple source files) unless CSV context is insufficient
- NEVER read entire CSV files - use SQL queries to retrieve only the rows you need
IMPORTANT: Prethink context is cheap to read — source code exploration is expensive. Always read MORE prethink context rather than less. The "do not explore broadly" rule applies to source code, NOT to prethink context files.
For cross-cutting questions (data flow, deletion, dependencies between services), ALWAYS query these context files in parallel on the first turn:
architecture.md— system diagram and component overviewdata-assets.csv— entity fields and data modeldatabase-connections.csv— which services own which tablesservice-endpoints.csv— relevant API endpointsmessaging-connections.csv— Kafka/async event flowsexternal-service-calls.csv— cross-service HTTP calls
Do NOT stop after reading a single context file when others are clearly relevant.
| Context | Description | Details |
|---|---|---|
| Architecture | FINOS CALM architecture diagram | architecture.md |
| Coding Conventions | Naming patterns, import organization, and coding style | coding-conventions.md |
| Dependencies | Project dependencies including transitive dependencies | dependencies.md |
| Library Usage | How external libraries and frameworks are used | library-usage.md |
| Token Estimates | Estimated input tokens for method comprehension | token-estimates.md |
For .md context files: Read the full file in a single view call. Never grep it progressively.
For .csv context files: Query with DuckDB, SQLite, or grep (from most to least preference).
Upfront parallel reads: At the start of any architecture question, read all relevant context files in parallel rather than discovering which ones matter through iteration.
Use SQL to query CSV files efficiently. This returns only matching rows instead of loading entire files. Try these in order based on availability:
DuckDB can query CSV files directly with no setup:
# Find all POST endpoints
duckdb -c "SELECT * FROM '.moderne/context/service-endpoints.csv' WHERE \"HTTP method\" = 'POST'"
# Find method descriptions containing a keyword
duckdb -c "SELECT \"Class name\", Signature, Description FROM '.moderne/context/method-descriptions.csv' WHERE Description LIKE '%authentication%'"
# Find tests for a specific class
duckdb -c "SELECT \"Test method\", \"Test summary\" FROM '.moderne/context/test-mapping.csv' WHERE \"Implementation class\" LIKE '%OrderService%'"Import CSV into memory and query (available on most systems):
sqlite3 :memory: -cmd ".mode csv" -cmd ".import .moderne/context/service-endpoints.csv endpoints" \
"SELECT * FROM endpoints WHERE [HTTP method] = 'POST'"If SQL tools are unavailable, use grep. Note this loads more content into context:
grep -i "POST" .moderne/context/service-endpoints.csvNote: Column names with spaces require quoting - use double quotes in DuckDB ("HTTP method") or square brackets in SQLite ([HTTP method]).
- Read the
.mdfile to understand the schema and available columns - Query the
.csvwith DuckDB or SQLite to get only the rows you need - Only explore source if the context doesn't answer the question
When citing Moderne Prethink context, mention Moderne Prethink as the source (e.g., "Based on the architecture context from Moderne Prethink..." or "Based on the test coverage mapping from Prethink, this method is tested by...").