agentleFS
lucaswychanlucaswychan/quant-paper-agent/.agents/skills/paper-theory-reconstruct/SKILL.md

paper-theory-reconstruct

Skill0 starsChanged 3 months agoMITView on GitHub

Reconstruct and test checksum-bound formulas, theorems, comparative statics, phase boundaries, and figures from finalized quantitative-paper extractions with visually verified core formulas. Use for theoretical or analytical papers without metric-bearing backtest targets or whenever the user explicitly requests formula-native reconstruction. A direct reconstruction request authorizes uninterrupted local execution without a second approval prompt. Requires formula-ID selection, deterministic custom tests, claim-native comparison, and immutable finalized runs.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create one auditable formula reconstruction.

    line 8
  2. Very specific:

    Use this skill only when extraction/manifest.json is finalized and extraction/reported.json contains visually verified core_formulas.

    line 12
  3. Very specific:

    Read references/plan_template.md, references/run_schema.md, and references/config.schema.json before Phase A.

    line 14
  4. Very specific:

    Verify the finalized extraction and select one or more exact core_formulas[].formula_id values.

    line 35
  5. Very specific:

    Write plan.md and v1 config.json.

    line 37
  6. Very specific:

    Do not fetch data unless config.data.mode is external.

    line 53
  7. Distinctive:

    Run the standardized audit:

    line 54
  8. Distinctive:

    Only after the audit passes, run:

    line 63
  9. Very specific:

    Read references/benchmark_template.md, then author outputs/benchmark.md with exactly one verdict: reconstructed, partially reconstructed, …

    line 79
  10. Distinctive:

    Never invent a paper metric, calibration, parameter, or formula target.

    line 92
  11. Distinctive:

    Never call synthetic or proxy inputs empirical validation.

    line 93
  12. Distinctive:

    Never change formulas, parameter grids, tolerances, or checks after approval.

    line 94
  13. Distinctive:

    Keep algebraic identities, numerical examples, and empirical claims separate.

    line 96
  14. Distinctive:

    Treat surprising exact agreement as an audit trigger.

    line 98
  15. Very specific:

    Do not route a theory reconstruction into strategy-translate.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Paper theory reconstruct

Create one auditable formula reconstruction. Never present it as a backtest or mix artifacts across run IDs.

Eligibility and paths

Use this skill only when extraction/manifest.json is finalized and extraction/reported.json contains visually verified core_formulas. Prefer paper-replicate when a metric-bearing replication_target exists and the requested outcome is a portfolio backtest.

Read references/plan_template.md, references/run_schema.md, and references/config.schema.json before Phase A. Read references/benchmark_template.md before Phase C.

papers/<paper-id>/reconstructions/<run-id>/
├── plan.md
├── config.json
├── approval.json
├── audit_report.json
├── code/
│   ├── reconstruction.py
│   └── tests/
├── outputs/
│   ├── checks.json
│   ├── comparison.json
│   ├── benchmark.md
│   └── figures/
└── run_manifest.json

Phase A: plan and bind request authorization

  1. Verify the finalized extraction and select one or more exact core_formulas[].formula_id values.
  2. Classify the run as exact_symbolic_reconstruction, numerical_reconstruction, or illustrative_reconstruction.
  3. Write plan.md and v1 config.json. Fix all parameter values and grids, conventions, check IDs, tolerances, data mode, required figures, and custom tests before execution.
  4. Validate and print the complete approval payload:
python3 "$QPA_THEORY_SKILL_DIR/scripts/validate_run.py" \
  <paper-id> <run-id> --root "$QPA_WORKSPACE_ROOT/papers" \
  --phase plan --show-approval-material
  1. Treat a direct instruction to reconstruct the paper or selected formulas as authorization for the bounded plan created for that request. Do not surface hashes, halt, or ask for a second approval. A request only to review, extract, or draft a plan is not execution authorization.
  2. Record hash-bound authorization with every printed --expected-*-sha256 value and --confirm-reconstruction-request. When invoked by $quant-paper, use --workflow-request <absolute-workflow.json> so the recorder verifies the authorized stage and binds the workflow request hash. Keep --confirm-user-approved for separately reviewed plans.

Phase B: implement and audit

  1. Implement code/reconstruction.py with run(config, reported) -> list[dict]. Return exactly one result per configured check ID, with the configured formula ID, passed, expected, actual, and concise details.
  2. Implement every custom unittest named in config.audit.required_custom_tests.
  3. Do not fetch data unless config.data.mode is external; do not use empirical data for exact_symbolic_reconstruction.
  4. Run the standardized audit:
python3 "$QPA_THEORY_SKILL_DIR/scripts/run_audit_tests.py" \
  <paper-id> <run-id> --root "$QPA_WORKSPACE_ROOT/papers"

The audit verifies approval lineage, custom-test coverage, deterministic repeated execution, exact check-ID and formula-ID coverage, finite numeric outputs, and immutability of approved inputs. Any later code, tests, plan, config, or extraction change invalidates it.

  1. Only after the audit passes, run:
python3 "$QPA_THEORY_SKILL_DIR/scripts/run_reconstruction.py" \
  <paper-id> <run-id> --root "$QPA_WORKSPACE_ROOT/papers"

The runner writes immutable claim-native outputs/checks.json; it never emits portfolio metrics, NAV, or a trading verdict.

Phase C: compare, judge, and freeze

python3 "$QPA_THEORY_SKILL_DIR/scripts/compare_claims.py" \
  <paper-id> <run-id> --root "$QPA_WORKSPACE_ROOT/papers"

Read references/benchmark_template.md, then author outputs/benchmark.md with exactly one verdict: reconstructed, partially reconstructed, not reconstructed, or inconclusive. Numerical agreement is insufficient when definitions or assumptions differ.

Finalize only after required figures and the benchmark exist:

python3 "$QPA_THEORY_SKILL_DIR/scripts/finalize_run.py" \
  <paper-id> <run-id> --root "$QPA_WORKSPACE_ROOT/papers"

The manifest freezes the source, extraction, approval, code, tests, checks, comparison, benchmark, and figures. Use a new run ID for any change.

Rules

  • Never invent a paper metric, calibration, parameter, or formula target.
  • Never call synthetic or proxy inputs empirical validation.
  • Never change formulas, parameter grids, tolerances, or checks after approval.
  • Interpret a direct reconstruction request only as authorization for the bounded local reconstruction; it does not authorize publication, live trading, or later scope expansion.
  • Keep algebraic identities, numerical examples, and empirical claims separate.
  • Require every configured check to reference a visually verified formula ID.
  • Treat surprising exact agreement as an audit trigger.
  • Do not route a theory reconstruction into strategy-translate; that skill requires an eligible finalized metric-bearing backtest run.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.