Skip to content

Add AGENTS.md and fix LaTeX math rendering in paper#36

Merged
mnwhite merged 1 commit intomainfrom
fix/agents-md-and-math-rendering
Mar 10, 2026
Merged

Add AGENTS.md and fix LaTeX math rendering in paper#36
mnwhite merged 1 commit intomainfrom
fix/agents-md-and-math-rendering

Conversation

@llorracc
Copy link
Contributor

Summary

  • Add AGENTS.md and .agents/ directory with project context for AI coding agents, covering code architecture, estimation pipeline, economics domain knowledge, paper/docs system, and build/CI details.
  • Fix LaTeX subscript rendering in content/paper/01-paper.md: throughout the math blocks, * had been used where _ (subscript operator) should be, and \_ (escaped underscore) where plain _ was needed. This caused myst start to render literal asterisks instead of proper subscripts (e.g. *c * t instead of $c_t$). Fixed all 12 affected equation blocks.

Details

AGENTS.md / .agents/

New files providing structured context for AI agents working on this codebase:

File Purpose
AGENTS.md Top-level overview: project orientation, conventions, model hierarchy, common tasks
.agents/architecture.md Package layout, module dependency graph, design patterns
.agents/estimation-pipeline.md Step-by-step estimation flow, optimizer config, age mappings
.agents/economics-context.md Domain knowledge: life-cycle models, parameters, data sources
.agents/paper-and-docs.md MyST paper system, math macros, Sphinx docs, generated content
.agents/build-and-ci.md Hatchling build, nox sessions, pre-commit, CI/CD workflows

Math rendering fixes

Three types of errors were fixed across 12 equation blocks in 01-paper.md:

  1. *{_{ — e.g. \vFunc*{t}\vFunc_{t}, \max*{\cNrm*{t}}\max_{\cNrm_{t}}
  2. \__ — e.g. \max\_{\cNrm}\max_{\cNrm}, \aFunc\_{t}\aFunc_{t}
  3. ^_^* — In the FOC equation, optimal-value superscripts were mangled (\cNrm^_\cNrm^*)

Test plan

  • Run myst start and verify all equations in the paper render with correct subscripts
  • Verify the AGENTS.md and .agents/ files are accessible and accurate

Made with Cursor

Add AGENTS.md and .agents/ directory with project context for AI coding
agents, covering architecture, estimation pipeline, economics domain
knowledge, paper/docs system, and build/CI details.

Fix LaTeX subscript rendering in content/paper/01-paper.md: throughout
the math blocks, `*` had been used where `_` (subscript operator) should
be, and `\_` (escaped underscore) where plain `_` is needed. This caused
MyST to render literal asterisks instead of subscripts (e.g. `*c * t`
instead of c_t). Fixed all 12 affected equation blocks.

Made-with: Cursor
@llorracc llorracc requested review from alanlujan91 and mnwhite March 10, 2026 12:27
@mnwhite mnwhite merged commit d173565 into main Mar 10, 2026
3 of 4 checks passed
llorracc added a commit that referenced this pull request Mar 10, 2026
…ate validate-pyproject

Three pre-existing CI failures addressed:

1. Exclude content/paper/*.md from prettier — prettier interprets LaTeX
   subscript operators (_) as Markdown emphasis and corrupts them to * or
   \_. This was the root cause of the math rendering bugs fixed in PR #36.

2. Apply ruff-format fixes to src/do_all.py and src/estimark/estimation.py
   (trailing whitespace on blank lines, spacing around ** operator).

3. Update validate-pyproject from v0.19 to v0.25 to fix the
   KeyError: 'https://json.schemastore.org/tox.json' crash in the
   schema-store plugin.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants