@texra-ai/cli 0.38.7 → 0.38.9
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/README.md +4 -1
- package/dist/bin/texra.js +1086 -1049
- package/dist/resources/agents/correct.yaml +9 -6
- package/dist/resources/agents/merge.yaml +1 -0
- package/dist/resources/agents/ocr.yaml +1 -0
- package/dist/resources/agents/polish.yaml +1 -0
- package/dist/resources/agents/transcribe_audio.yaml +1 -0
- package/dist/resources/skills/inline-paper-critic/SKILL.md +40 -0
- package/dist/resources/skills/inline-paper-critic/agents/openai.yaml +4 -0
- package/dist/resources/skills/inline-paper-critic/references/critique-checklist.md +40 -0
- package/dist/resources/skills/lean-blueprint/SKILL.md +37 -0
- package/dist/resources/skills/lean-blueprint/agents/openai.yaml +4 -0
- package/dist/resources/skills/lean-blueprint/references/blueprint-checklist.md +28 -0
- package/dist/resources/skills/lean-proof-assistant/SKILL.md +30 -0
- package/dist/resources/skills/lean-proof-assistant/agents/openai.yaml +4 -0
- package/dist/resources/skills/lean-proof-assistant/references/proof-workflow.md +23 -0
- package/dist/resources/skills/lean-search/SKILL.md +30 -0
- package/dist/resources/skills/lean-search/agents/openai.yaml +4 -0
- package/dist/resources/skills/lean-search/references/search-playbook.md +23 -0
- package/dist/resources/skills/lean-simplifier/SKILL.md +30 -0
- package/dist/resources/skills/lean-simplifier/agents/openai.yaml +4 -0
- package/dist/resources/skills/lean-simplifier/references/simplifier-checklist.md +27 -0
- package/dist/resources/skills/literature-search/SKILL.md +30 -0
- package/dist/resources/skills/literature-search/agents/openai.yaml +4 -0
- package/dist/resources/skills/literature-search/references/source-evaluation.md +25 -0
- package/dist/resources/skills/manuscript-review/SKILL.md +32 -0
- package/dist/resources/skills/manuscript-review/agents/openai.yaml +4 -0
- package/dist/resources/skills/manuscript-review/references/review-checklist.md +34 -0
- package/dist/resources/skills/math-ocr/SKILL.md +29 -0
- package/dist/resources/skills/math-ocr/agents/openai.yaml +4 -0
- package/dist/resources/skills/math-ocr/references/ocr-checklist.md +21 -0
- package/dist/resources/skills/mathematical-enhancer/SKILL.md +32 -0
- package/dist/resources/skills/mathematical-enhancer/agents/openai.yaml +4 -0
- package/dist/resources/skills/mathematical-enhancer/references/enhancement-checklist.md +30 -0
- package/dist/resources/skills/scientific-presenter/SKILL.md +30 -0
- package/dist/resources/skills/scientific-presenter/agents/openai.yaml +4 -0
- package/dist/resources/skills/scientific-presenter/references/slide-quality-checklist.md +34 -0
- package/dist/resources/skills/scientific-simplifier/SKILL.md +30 -0
- package/dist/resources/skills/scientific-simplifier/agents/openai.yaml +4 -0
- package/dist/resources/skills/scientific-simplifier/references/simplification-checklist.md +23 -0
- package/dist/resources/skills/tikz-figure-builder/SKILL.md +31 -0
- package/dist/resources/skills/tikz-figure-builder/agents/openai.yaml +4 -0
- package/dist/resources/skills/tikz-figure-builder/references/figure-checklist.md +25 -0
- package/dist/resources/skills/writing-commenter/SKILL.md +35 -0
- package/dist/resources/skills/writing-commenter/agents/openai.yaml +4 -0
- package/dist/resources/skills/writing-commenter/references/commenting-checklist.md +33 -0
- package/dist/resources/tool_use_agents/assistant.yaml +1 -0
- package/dist/resources/tool_use_agents/changeReviewer.yaml +71 -0
- package/dist/resources/tool_use_agents/codeReviewer.yaml +1 -0
- package/dist/resources/tool_use_agents/codeSimplifier.yaml +1 -0
- package/dist/resources/tool_use_agents/coder.yaml +1 -0
- package/dist/resources/tool_use_agents/creator.yaml +1 -0
- package/dist/resources/tool_use_agents/engineer.yaml +1 -0
- package/dist/resources/tool_use_agents/latexDiff.yaml +1 -0
- package/dist/resources/tool_use_agents/latexFixer.yaml +1 -0
- package/dist/resources/tool_use_agents/lean.yaml +1 -0
- package/dist/resources/tool_use_agents/numerics.yaml +1 -0
- package/dist/resources/tool_use_agents/presenter.yaml +1 -0
- package/dist/resources/tool_use_agents/prover.yaml +1 -0
- package/dist/resources/tool_use_agents/research.yaml +1 -0
- package/dist/resources/tool_use_agents/review.yaml +7 -4
- package/dist/resources/tool_use_agents/setup.yaml +50 -30
- package/dist/resources/tool_use_agents/testEngineer.yaml +1 -0
- package/package.json +4 -3
- package/dist/bin/orchestrate-harness.js +0 -38344
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
name: correct
|
|
2
|
+
displayName: Correct — typos, grammar & LaTeX
|
|
2
3
|
description: Fixes typos, grammar, and LaTeX formatting without changing your writing style or content.
|
|
3
4
|
|
|
4
5
|
settings:
|
|
@@ -9,13 +10,13 @@ settings:
|
|
|
9
10
|
|
|
10
11
|
prompts:
|
|
11
12
|
systemPrompt: |
|
|
12
|
-
You are a meticulous LaTeX proofreader. Your task is to correct typos, grammar, and formatting issues in a research paper while preserving the authors' intent and content.
|
|
13
|
+
You are a meticulous LaTeX proofreader. Your task is to correct typos, grammar, and formatting issues in a research paper while preserving the authors' intent and content. Do not rewrite mathematical content.
|
|
13
14
|
|
|
14
15
|
When correcting a professional *.tex \LaTeX document, you must:
|
|
15
16
|
{{ LATEX_STYLE_RULES }}
|
|
16
17
|
|
|
17
18
|
userPrefix: |
|
|
18
|
-
I am going to give you a \LaTeX document of a research paper. You are about to correct
|
|
19
|
+
I am going to give you a \LaTeX document of a research paper. You are about to correct typos, grammar, and formatting in the document. So please read the document carefully.
|
|
19
20
|
|
|
20
21
|
Here is the \LaTeX document with input files (which may include appendix, and LaTeX auxiliary files that define the math commands you should use):
|
|
21
22
|
|
|
@@ -33,11 +34,13 @@ prompts:
|
|
|
33
34
|
{% endif %}
|
|
34
35
|
|
|
35
36
|
userRequest: |
|
|
36
|
-
Please carefully read through the entire document, looking for
|
|
37
|
+
Please carefully read through the entire document, looking for typos, grammatical errors, and formatting inconsistencies that can be corrected without changing the paper's claims.
|
|
37
38
|
|
|
38
|
-
As you review the document, make
|
|
39
|
-
-
|
|
40
|
-
-
|
|
39
|
+
As you review the document, make only proofreading corrections:
|
|
40
|
+
- Preserve every mathematical claim, equation, theorem statement, and factual assertion.
|
|
41
|
+
- Do not change math tokens inside inline math, display math, theorem statements, or derivations except for LaTeX syntax/formatting fixes such as spacing, delimiters, braces, or indentation.
|
|
42
|
+
- Do not replace a false or unsupported mathematical statement with a different true statement. For example, if the input says `(x+1)^2 = x^2 + 1`, keep that equation unchanged.
|
|
43
|
+
- Mathematical verification belongs to review-oriented agents; this agent only proofreads.
|
|
41
44
|
|
|
42
45
|
Output one updated \LaTeX document for each input file, using the matching input filename as the document name.
|
|
43
46
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: inline-paper-critic
|
|
3
|
+
description: Critically annotate technical papers with inline comments about mathematical gaps, unjustified steps, risky assumptions, and verified results. Use when Codex needs to leave compile-safe review comments directly in a LaTeX manuscript, especially in a `\\criticize{comment}{severity}{confidence}` style for derivation-heavy papers where appendices and hidden calculations must be checked carefully.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Inline Paper Critic
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill for inline technical review of mathematical or derivation-heavy papers when the output should be comments embedded in the manuscript rather than a separate review memo.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Read the entire manuscript, including appendices and auxiliary files, before deciding that a step is missing or unjustified.
|
|
15
|
+
2. Expand important derivations mentally or on scratch paper before commenting. A good inline critique should come from actual verification, not surface-level suspicion.
|
|
16
|
+
3. Prioritize issues that affect validity: broken proofs, missing essential steps, unjustified coefficients, hidden assumptions, incorrect limits, or inconsistent claims.
|
|
17
|
+
4. If a derivation is already handled in an appendix, say so and adjust severity accordingly rather than treating the main text as simply wrong.
|
|
18
|
+
5. When the document already uses a `\criticize{comment}{severity}{confidence}`-style macro, preserve that format. Otherwise adapt to the local inline annotation convention without losing the same discipline.
|
|
19
|
+
6. If the macro is missing, provide a minimal command definition before inserting annotations:
|
|
20
|
+
|
|
21
|
+
```latex
|
|
22
|
+
\newcommand{\criticize}[3]{\textcolor{red}{\textbf{[#2|#3]} #1}}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Keep the document's existing color/theme conventions when present.
|
|
26
|
+
|
|
27
|
+
7. Use inline comments strategically. Group related minor issues and reserve the harshest comments for problems that really threaten the result.
|
|
28
|
+
8. When a calculation checks out, leave explicit verification comments when that helps the author distinguish true problems from confirmed material.
|
|
29
|
+
9. Ensure every inline comment is valid LaTeX and can remain in the document without breaking compilation.
|
|
30
|
+
|
|
31
|
+
## Quality Bar
|
|
32
|
+
|
|
33
|
+
- Check appendices before accusing the paper of omission.
|
|
34
|
+
- Base comments on actual mathematical verification whenever possible.
|
|
35
|
+
- Use severity and confidence consistently; do not inflate comments just to sound forceful.
|
|
36
|
+
- Treat severity as impact on validity and confidence as certainty of the diagnosis, not as two versions of the same number.
|
|
37
|
+
- A compile-safe inline review comment is better than a sharper comment that breaks the document.
|
|
38
|
+
- If you verified something as correct, say what you checked.
|
|
39
|
+
|
|
40
|
+
For a deeper pass over severity discipline, appendix-first review, and compile-safe comment writing, use [references/critique-checklist.md](references/critique-checklist.md).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Critique Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist for inline technical criticism of a manuscript.
|
|
4
|
+
|
|
5
|
+
## Verification before criticism
|
|
6
|
+
|
|
7
|
+
- Check appendices and supplementary derivations before claiming something is missing.
|
|
8
|
+
- Work through the calculation or proof enough to know whether the issue is real.
|
|
9
|
+
- Distinguish a missing explanation from an actual mathematical error.
|
|
10
|
+
|
|
11
|
+
## What to comment on
|
|
12
|
+
|
|
13
|
+
- Broken proofs or unjustified logical steps
|
|
14
|
+
- Missing derivation steps that matter for validity
|
|
15
|
+
- Unjustified coefficients, assumptions, or approximations
|
|
16
|
+
- Contradictions between text, equations, and claimed results
|
|
17
|
+
- Verified calculations that are worth marking as checked
|
|
18
|
+
|
|
19
|
+
## Severity and confidence
|
|
20
|
+
|
|
21
|
+
- Reserve the highest severity for issues that endanger the main claim.
|
|
22
|
+
- Use lower severity for exposition or local cleanup.
|
|
23
|
+
- Keep confidence separate from severity; an alarming but uncertain issue should say so.
|
|
24
|
+
- If using a `\criticize{...}{severity}{confidence}` scheme, keep the comment text self-contained and specific enough to survive outside the conversation.
|
|
25
|
+
|
|
26
|
+
## Typical scale
|
|
27
|
+
|
|
28
|
+
- Severity 5: invalidates a central claim or proof
|
|
29
|
+
- Severity 4: seriously weakens a major argument
|
|
30
|
+
- Severity 3: important but not fatal gap or inconsistency
|
|
31
|
+
- Severity 2: local but worthwhile fix
|
|
32
|
+
- Severity 1: cosmetic or low-impact cleanup
|
|
33
|
+
|
|
34
|
+
## LaTeX safety
|
|
35
|
+
|
|
36
|
+
- Write inline comments that compile cleanly.
|
|
37
|
+
- Use proper math mode, escaped special characters, and reference syntax.
|
|
38
|
+
- If `\criticize` is undefined, add a minimal macro such as
|
|
39
|
+
`\newcommand{\criticize}[3]{\textcolor{red}{\textbf{[#2|#3]} #1}}` and match local style conventions.
|
|
40
|
+
- Prefer fewer precise comments over many noisy ones.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lean-blueprint
|
|
3
|
+
description: Create and maintain Lean blueprint documents that connect informal mathematics to Lean 4 formalization. Use when Codex needs to draft or sync blueprint entries, map paper results to Lean declarations, track dependencies between statements, or keep blueprint prose aligned with a changing Lean codebase.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lean Blueprint
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill for blueprint authoring and maintenance: writing new dependency-tracked blueprint content, syncing an existing blueprint with Lean declarations, or translating Lean formalization progress into human-readable mathematical prose.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Survey the Lean project and the existing blueprint files before writing anything. Understand the mathematical architecture and the current formalization status first.
|
|
15
|
+
2. Build or repair the dependency graph from the main results backward. Each node should be a meaningful unit of work for a contributor.
|
|
16
|
+
3. Use the blueprint macros deliberately:
|
|
17
|
+
- `\lean{Namespace.decl}` to link to Lean declarations
|
|
18
|
+
- `\leanok` only when the declaration is actually formalized and clean
|
|
19
|
+
- `\uses{label1,label2}` for dependency tracking
|
|
20
|
+
- `\notready` for items that still need blueprint work
|
|
21
|
+
- `\proves{label}` when a proof block is separated from its statement
|
|
22
|
+
4. Write blueprint prose as mathematics, not as disguised Lean syntax. Use conventional notation and let the Lean linkage live in the explicit blueprint macros.
|
|
23
|
+
5. When a declaration exists, verify its name, status, and statement before marking blueprint entries as formalized.
|
|
24
|
+
6. Keep blueprint statements, proof sketches, and dependency annotations synchronized with the real Lean codebase.
|
|
25
|
+
7. Check for drift in both directions: Lean declarations missing from the blueprint, and blueprint entries that no longer match Lean.
|
|
26
|
+
8. Treat the blueprint as a human coordination document first and a status mirror second.
|
|
27
|
+
|
|
28
|
+
## Quality Bar
|
|
29
|
+
|
|
30
|
+
- Blueprint prose should read like normal mathematical writing.
|
|
31
|
+
- Never let Lean identifiers leak into the prose body when standard notation exists.
|
|
32
|
+
- Dependencies should be explicit and accurate enough to support parallel work.
|
|
33
|
+
- Formalized status markers should reflect reality, not aspiration.
|
|
34
|
+
- Statement mismatches between blueprint and Lean are real bugs, not cosmetic issues.
|
|
35
|
+
- A reader should be able to understand the mathematical roadmap without reading Lean source first.
|
|
36
|
+
|
|
37
|
+
For new blueprint skeletons or drift audits, use [references/blueprint-checklist.md](references/blueprint-checklist.md) to check dependency tracking, statement syncing, and notation translation.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Lean Blueprint Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when authoring or syncing a blueprint against a Lean project.
|
|
4
|
+
|
|
5
|
+
## Project survey
|
|
6
|
+
|
|
7
|
+
- Read both the blueprint files and the Lean declarations they reference.
|
|
8
|
+
- Identify the main results, the dependency DAG, and the current formalization status.
|
|
9
|
+
|
|
10
|
+
## Writing
|
|
11
|
+
|
|
12
|
+
- Write the prose as standard mathematics, not as Lean syntax with punctuation.
|
|
13
|
+
- Use conventional notation whenever possible.
|
|
14
|
+
- Keep proof sketches strategic and human-readable.
|
|
15
|
+
- Use the explicit blueprint macros consistently: `\lean`, `\leanok`, `\uses`, `\notready`, and `\proves` when appropriate.
|
|
16
|
+
|
|
17
|
+
## Syncing
|
|
18
|
+
|
|
19
|
+
- Verify each linked Lean declaration still exists and still states the same mathematics.
|
|
20
|
+
- Update formalization-status markers only after checking the real code.
|
|
21
|
+
- Check for declaration drift in both directions: missing blueprint entries and stale references.
|
|
22
|
+
- Check that the informal blueprint statement still matches the Lean theorem mathematically, not just by name.
|
|
23
|
+
|
|
24
|
+
## Dependencies
|
|
25
|
+
|
|
26
|
+
- Keep dependency annotations explicit and accurate.
|
|
27
|
+
- Remove spurious dependencies that hide parallelism.
|
|
28
|
+
- Flag circular mathematical dependencies, not just syntactic graph issues.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lean-proof-assistant
|
|
3
|
+
description: Develop and debug Lean 4 proofs in project context. Use when Codex needs to understand a theorem, inspect goals, search for supporting lemmas, write or repair Lean proof terms or tactic scripts, and iterate with diagnostics until the file is clean.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lean Proof Assistant
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill for day-to-day Lean 4 proof development: proving lemmas, debugging errors, filling gaps, inspecting goals, or turning an informal proof outline into working Lean code.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Read the target file and surrounding declarations before editing. Understand the theorem statement, available hypotheses, and local notation.
|
|
15
|
+
2. Check the current diagnostics first. Let the elaborator tell you what is actually wrong before you guess.
|
|
16
|
+
3. Outline the proof strategy informally before writing code when the theorem is nontrivial.
|
|
17
|
+
4. Search for existing lemmas and APIs before inventing helper lemmas or long tactic scripts.
|
|
18
|
+
5. Work in small iterations: edit one proof step, recheck, inspect the new goal state, and continue.
|
|
19
|
+
6. Prefer clear proof structure over brittle wizardry. Use the tactic or term style that makes the mathematical idea easiest to review.
|
|
20
|
+
7. Finish by making the file clean: no broken goals, no stale debugging commands, no accidental scaffolding left behind.
|
|
21
|
+
|
|
22
|
+
## Quality Bar
|
|
23
|
+
|
|
24
|
+
- Do not fight the goal blindly. Inspect the precise goal and local context after each meaningful step.
|
|
25
|
+
- Prefer existing Mathlib lemmas over reproving folklore.
|
|
26
|
+
- Keep proofs readable enough that another formalizer can maintain them.
|
|
27
|
+
- Treat diagnostics as ground truth.
|
|
28
|
+
- If a proof attempt becomes opaque or fragile, back up and choose a clearer route.
|
|
29
|
+
|
|
30
|
+
For stuck proofs or longer debugging sessions, use [references/proof-workflow.md](references/proof-workflow.md) for a stricter loop around search, inspection, iteration, and cleanup.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Lean Proof Workflow
|
|
2
|
+
|
|
3
|
+
Use this checklist when proof development is stuck or the file needs a disciplined debugging loop.
|
|
4
|
+
|
|
5
|
+
## Core loop
|
|
6
|
+
|
|
7
|
+
- Read the theorem statement and nearby lemmas first.
|
|
8
|
+
- Check diagnostics before guessing.
|
|
9
|
+
- Inspect the exact goal and local hypotheses after each meaningful step.
|
|
10
|
+
- Edit in small increments and recheck immediately.
|
|
11
|
+
|
|
12
|
+
## Search and proof strategy
|
|
13
|
+
|
|
14
|
+
- Search for existing lemmas before proving helpers.
|
|
15
|
+
- Try both type-shape and name-based searches.
|
|
16
|
+
- Prefer clear proof structure over long fragile tactic chains.
|
|
17
|
+
- Use the tactic family that matches the goal shape instead of forcing one hammer everywhere.
|
|
18
|
+
|
|
19
|
+
## Cleanup
|
|
20
|
+
|
|
21
|
+
- Remove stale debugging commands and temporary scaffolding.
|
|
22
|
+
- Keep the final proof readable enough for another contributor to maintain.
|
|
23
|
+
- Leave the file with clean diagnostics.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lean-search
|
|
3
|
+
description: Find existing Lean 4 and Mathlib lemmas, APIs, imports, and formalization patterns. Use when Codex needs to answer whether a result already exists, locate the right theorem or module, understand how Mathlib formalizes a concept, or avoid duplicate formalization work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lean Search
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill when the main job is discovery rather than proving: find the right lemma, import, namespace, declaration name, or formalization pattern before writing code.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Start from the mathematical content, not from a guessed theorem name.
|
|
15
|
+
2. Search broadly and iteratively. Try multiple surfaces before concluding something is missing: type-shape search, name-pattern search, source grep, module-path discovery, and docs or community references.
|
|
16
|
+
3. Read the actual source around promising hits. The surrounding lemmas and proof patterns often matter more than the first exact match.
|
|
17
|
+
4. Distinguish exact matches, adaptable near-matches, and genuinely missing API.
|
|
18
|
+
5. When something appears missing, say where it would likely belong and what the most general statement should be.
|
|
19
|
+
6. Report enough metadata to make the result usable immediately: full name, import path, statement shape, and any caveats.
|
|
20
|
+
7. Show your search process briefly so another formalizer can trust the conclusion and continue from it.
|
|
21
|
+
|
|
22
|
+
## Quality Bar
|
|
23
|
+
|
|
24
|
+
- Prevent duplicate work whenever possible.
|
|
25
|
+
- Do not stop after one search method fails.
|
|
26
|
+
- Prefer Mathlib's general result over a project-specific reproving of the same fact.
|
|
27
|
+
- Show what you searched and what you found so the answer is auditable.
|
|
28
|
+
- When uncertain, provide the best nearby API and explain the gap.
|
|
29
|
+
|
|
30
|
+
For hard-to-find results, use [references/search-playbook.md](references/search-playbook.md) to run a more disciplined search across theorem names, type shapes, source files, and import paths.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Lean Search Playbook
|
|
2
|
+
|
|
3
|
+
Use this playbook when the first obvious search attempt does not find the right API.
|
|
4
|
+
|
|
5
|
+
## Search order
|
|
6
|
+
|
|
7
|
+
- Start with type-shape or theorem-name search.
|
|
8
|
+
- Search Mathlib source directly when local packages are available.
|
|
9
|
+
- Read surrounding source, not just isolated hits.
|
|
10
|
+
- Check docs or community references when the local codebase is inconclusive.
|
|
11
|
+
- Do not conclude “missing” after a single failed query; reformulate the statement and search again.
|
|
12
|
+
|
|
13
|
+
## Reporting results
|
|
14
|
+
|
|
15
|
+
- Distinguish exact match, near match, and missing result.
|
|
16
|
+
- Include the full declaration name and import path.
|
|
17
|
+
- Explain how a near match needs to be adapted.
|
|
18
|
+
|
|
19
|
+
## Missing-lemma cases
|
|
20
|
+
|
|
21
|
+
- Say why the result appears absent.
|
|
22
|
+
- Suggest the likely general statement.
|
|
23
|
+
- Suggest where such a lemma would naturally live.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lean-simplifier
|
|
3
|
+
description: Refactor Lean 4 code and proofs toward Mathlib-quality style without changing theorem statements or computational meaning. Use when Codex needs to simplify tactic scripts, generalize declarations, improve naming and organization, remove duplication, or make Lean code cleaner and more upstream-ready.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lean Simplifier
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill when Lean code already works or nearly works, but it is noisy, repetitive, overly specialized, poorly named, or farther from Mathlib style than it should be.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Read the file as a whole before changing local proofs. Many style and generality problems only make sense at file scope.
|
|
15
|
+
2. Check diagnostics first so you know whether you are simplifying a clean file or repairing active breakage.
|
|
16
|
+
3. Preserve meaning exactly: theorem statements, definitions, and computed behavior should not change.
|
|
17
|
+
4. Improve the file in the order that usually pays off most: naming and organization, import hygiene, docstrings, proof cleanup, then generalization and deduplication.
|
|
18
|
+
5. Replace brittle tactic chains with clearer arguments when that actually improves reviewability.
|
|
19
|
+
6. Search Mathlib before keeping local lemmas that smell standard.
|
|
20
|
+
7. Recheck after each logical edit and revert any “simplification” that makes the code harder to trust.
|
|
21
|
+
|
|
22
|
+
## Quality Bar
|
|
23
|
+
|
|
24
|
+
- Target Mathlib-quality readability, not just shorter code.
|
|
25
|
+
- Prefer the weakest useful assumptions and the most general reusable statement.
|
|
26
|
+
- Do not over-generalize just for aesthetics.
|
|
27
|
+
- Remove debugging leftovers, dead code, and sorry-driven scaffolding.
|
|
28
|
+
- A shorter proof is worse if it becomes opaque.
|
|
29
|
+
|
|
30
|
+
For serious cleanup or upstream preparation, use [references/simplifier-checklist.md](references/simplifier-checklist.md) to review style, generality, proof cleanup, and lint-facing details.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Lean Simplifier Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist for deeper cleanup passes aimed at Mathlib-quality code.
|
|
4
|
+
|
|
5
|
+
## Style and organization
|
|
6
|
+
|
|
7
|
+
- Keep imports minimal and organized.
|
|
8
|
+
- Use consistent naming that follows Mathlib patterns.
|
|
9
|
+
- Add or improve docstrings for public declarations.
|
|
10
|
+
- Group related declarations and remove dead fragments.
|
|
11
|
+
|
|
12
|
+
## Proof cleanup
|
|
13
|
+
|
|
14
|
+
- Replace brittle chains with clearer arguments when possible.
|
|
15
|
+
- Prefer `calc`, well-scoped `simp`, and direct structure over clutter.
|
|
16
|
+
- Avoid shortening proofs at the cost of readability.
|
|
17
|
+
|
|
18
|
+
## Generality and reuse
|
|
19
|
+
|
|
20
|
+
- Use the weakest useful assumptions.
|
|
21
|
+
- Merge true duplicates through generalization when it simplifies the API.
|
|
22
|
+
- Search Mathlib before retaining project-local copies of standard results.
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
- Re-run diagnostics after each logical edit.
|
|
27
|
+
- Revert any refactor that introduces new breakage or obscures the argument.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: literature-search
|
|
3
|
+
description: Discover, verify, and synthesize academic literature and web sources for research tasks. Use when Codex needs to find recent papers, trace citations, compare preprints with published versions, verify attributed claims, or build a source-backed literature summary with primary references.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Literature Search
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill for related-work searches, citation verification, research briefings, source-backed summaries, and claim checking across papers, arXiv, DOIs, and the open web.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Start from the actual question. Identify the topic, time window, field, and whether the user wants breadth, depth, recency, or verification.
|
|
15
|
+
2. Prefer primary sources. Use publisher pages, DOI metadata, arXiv records, official project pages, and original papers before secondary summaries.
|
|
16
|
+
3. Distinguish source types clearly: peer-reviewed publication, preprint, project page, documentation, benchmark site, or news coverage.
|
|
17
|
+
4. Capture bibliographic facts while searching: title, authors, venue, year, DOI, arXiv ID, and URL.
|
|
18
|
+
5. Cross-check important claims across more than one source when possible, especially for dates, quantitative results, and priority claims.
|
|
19
|
+
6. For literature reviews, group findings by theme or method rather than presenting an unstructured list.
|
|
20
|
+
7. When the user needs a recommendation or synthesis, explain the tradeoffs and evidence rather than only listing papers.
|
|
21
|
+
|
|
22
|
+
## Quality Bar
|
|
23
|
+
|
|
24
|
+
- Do not present unverified claims as settled fact.
|
|
25
|
+
- Prefer the latest authoritative version when preprint and journal versions differ.
|
|
26
|
+
- Keep citation details precise enough that a researcher can find the source immediately.
|
|
27
|
+
- Separate what a paper claims from what you infer from it.
|
|
28
|
+
- Note recency explicitly when the topic is moving quickly.
|
|
29
|
+
|
|
30
|
+
For a deeper evaluation pass, use [references/source-evaluation.md](references/source-evaluation.md) when comparing conflicting sources, building a formal literature review, or checking whether a citation really supports a claim.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Source Evaluation Checklist
|
|
2
|
+
|
|
3
|
+
Use this file when the search result needs to be rigorous, citable, or recommendation-grade.
|
|
4
|
+
|
|
5
|
+
## Source hierarchy
|
|
6
|
+
|
|
7
|
+
- Prefer original papers, publisher pages, official documentation, and project pages.
|
|
8
|
+
- Treat news posts, blogs, and summaries as secondary context unless the user explicitly wants them.
|
|
9
|
+
|
|
10
|
+
## Verification
|
|
11
|
+
|
|
12
|
+
- Confirm title, authors, year, venue, DOI, and arXiv ID.
|
|
13
|
+
- Check whether the paper version you cite is a preprint or a peer-reviewed publication.
|
|
14
|
+
- When a claim matters, verify that the cited source really supports it.
|
|
15
|
+
|
|
16
|
+
## Synthesis
|
|
17
|
+
|
|
18
|
+
- Group papers by method, question, or result rather than listing them chronologically.
|
|
19
|
+
- Separate what the source states from your own inference.
|
|
20
|
+
- Note disagreement, uncertainty, or version drift explicitly.
|
|
21
|
+
|
|
22
|
+
## Recency
|
|
23
|
+
|
|
24
|
+
- State dates for fast-moving topics.
|
|
25
|
+
- Prefer the most recent authoritative source when multiple versions exist.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manuscript-review
|
|
3
|
+
description: Audit technical manuscripts for mathematical correctness, logical soundness, notation consistency, evidence quality, and figure or code alignment. Use when Codex needs to review a paper, verify derivations, prioritize findings, or produce a rigorous findings-first assessment instead of rewriting prose blindly.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Manuscript Review
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill for serious review passes on papers, notes, appendices, or technical drafts where the main job is to find problems, verify important claims, and report actionable findings.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Read the full manuscript context first, including appendices, bibliography, macros, figures, and any supporting code that drives results.
|
|
15
|
+
2. Identify the main claims and the highest-risk derivations, proofs, experiments, and references before going broad.
|
|
16
|
+
3. Verify critical calculations independently when feasible. Check limiting cases, dimensions, signs, factors, boundary conditions, and whether stated results follow from the setup.
|
|
17
|
+
4. Use computational verification tools when available for symbolic algebra, identities, spot checks, and code-backed results. If you verify something numerically or symbolically, say so explicitly in the findings.
|
|
18
|
+
5. Trace notation across the document. Confirm symbols are defined before use and stay stable across sections, figures, and code.
|
|
19
|
+
6. Check code-manuscript consistency when the paper depends on scripts, notebooks, generated figures, or implemented algorithms.
|
|
20
|
+
7. Check whether the manuscript actually delivers the goals stated in the abstract and introduction.
|
|
21
|
+
8. Produce findings first. Order them by severity and point to exact locations.
|
|
22
|
+
9. Distinguish confirmed errors, likely issues, and open questions. Do not blur them together.
|
|
23
|
+
|
|
24
|
+
## Quality Bar
|
|
25
|
+
|
|
26
|
+
- Check appendices before claiming a derivation is missing.
|
|
27
|
+
- Focus on issues that affect validity, interpretation, reproducibility, or reader comprehension.
|
|
28
|
+
- Be specific about what you verified and how.
|
|
29
|
+
- Prefer a short list of high-signal findings over a noisy dump of minor edits.
|
|
30
|
+
- If no major issues are found, say that explicitly and note any residual uncertainty or untested areas.
|
|
31
|
+
|
|
32
|
+
For a formal audit pass, use [references/review-checklist.md](references/review-checklist.md) when the manuscript is mathematically dense, has code-backed figures or computations, or needs a full findings report.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this file when the manuscript needs a formal technical review rather than a quick read.
|
|
4
|
+
|
|
5
|
+
## Main claims
|
|
6
|
+
|
|
7
|
+
- Identify the paper's stated goals from the abstract and introduction.
|
|
8
|
+
- Check whether the main body actually delivers each goal.
|
|
9
|
+
|
|
10
|
+
## Mathematical verification
|
|
11
|
+
|
|
12
|
+
- Reproduce key derivations independently when feasible.
|
|
13
|
+
- Check signs, factors, dimensions, limits, and boundary conditions.
|
|
14
|
+
- Verify that solutions satisfy the equations they claim to solve.
|
|
15
|
+
- Use symbolic or numerical checks when useful, and report what was checked.
|
|
16
|
+
|
|
17
|
+
## Appendices and notation
|
|
18
|
+
|
|
19
|
+
- Check appendices before claiming detail is missing.
|
|
20
|
+
- Confirm every important symbol is defined before use.
|
|
21
|
+
- Track notation consistency across text, equations, figures, captions, and code.
|
|
22
|
+
|
|
23
|
+
## Figures, code, and references
|
|
24
|
+
|
|
25
|
+
- Check that figures match the text and that labels are consistent.
|
|
26
|
+
- Compare code-backed claims with the actual implementation when code is available.
|
|
27
|
+
- Verify that cited sources support the specific claims attached to them.
|
|
28
|
+
- Check that quantitative claims in prose match tables, code outputs, and plotted data.
|
|
29
|
+
|
|
30
|
+
## Findings format
|
|
31
|
+
|
|
32
|
+
- Lead with findings, ordered by severity.
|
|
33
|
+
- Include exact locations and short explanations of impact.
|
|
34
|
+
- Separate confirmed errors, likely issues, and open questions.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: math-ocr
|
|
3
|
+
description: Convert handwritten or image-based mathematical content into notation-consistent LaTeX. Use when Codex needs to transcribe equations from notes, screenshots, whiteboards, or scans, reconcile ambiguous symbols against an existing document, or clean up OCR output into compilable mathematical LaTeX.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Math OCR
|
|
7
|
+
|
|
8
|
+
## When to use this skill
|
|
9
|
+
|
|
10
|
+
Use this skill when the input is handwritten math, a screenshot of equations, or rough symbolic content that must become clean LaTeX matching an existing paper, note set, or slide deck.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Read the surrounding LaTeX context first when it exists. Reuse the document's notation, macro names, environment style, and equation conventions.
|
|
15
|
+
2. Inspect the image carefully before transcribing. Identify ambiguous glyphs, line breaks, superscripts, subscripts, delimiters, and alignment structure.
|
|
16
|
+
3. Translate math into the simplest correct LaTeX that matches the target document's style.
|
|
17
|
+
4. Mark uncertainty mentally and resolve it against context instead of guessing in isolation.
|
|
18
|
+
5. If the expression belongs inside a larger derivation, preserve the intended structure rather than producing a flat symbol dump.
|
|
19
|
+
6. Review the transcription once for likely OCR confusions such as similar letters, missing braces, swapped indices, or incorrect nesting.
|
|
20
|
+
|
|
21
|
+
## Quality Bar
|
|
22
|
+
|
|
23
|
+
- Notation consistency beats literal shape matching when the handwriting is ambiguous.
|
|
24
|
+
- Preserve mathematical structure, not just token order.
|
|
25
|
+
- Ensure delimiters, fractions, and indices are syntactically sound and compile cleanly.
|
|
26
|
+
- Prefer standard LaTeX environments already used by the target document.
|
|
27
|
+
- Call out unresolved ambiguity instead of silently inventing a precise symbol.
|
|
28
|
+
|
|
29
|
+
For ambiguity-heavy input, use [references/ocr-checklist.md](references/ocr-checklist.md) when the handwriting is messy, symbols are overloaded, or the result must fit strict manuscript notation.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# OCR Checklist
|
|
2
|
+
|
|
3
|
+
Use this file when the handwriting or scan quality makes transcription error-prone.
|
|
4
|
+
|
|
5
|
+
## Context matching
|
|
6
|
+
|
|
7
|
+
- Reuse the target document's notation, macros, and environment style.
|
|
8
|
+
- Resolve ambiguous symbols against nearby equations or definitions first.
|
|
9
|
+
|
|
10
|
+
## Common OCR traps
|
|
11
|
+
|
|
12
|
+
- Similar letters such as `x` and `\chi`, `v` and `\nu`, `l` and `1`
|
|
13
|
+
- Misread superscripts, subscripts, and nested braces
|
|
14
|
+
- Dropped delimiters, alignment markers, or fraction structure
|
|
15
|
+
- Swapped indices or incorrect ordering in tensor-like notation
|
|
16
|
+
|
|
17
|
+
## Final checks
|
|
18
|
+
|
|
19
|
+
- Ensure the LaTeX is syntactically valid.
|
|
20
|
+
- Preserve the intended structure of multi-line derivations.
|
|
21
|
+
- Flag unresolved ambiguity instead of inventing precision that is not supported by the image.
|