agentleFS
gadiccgadicc/yahoo-finance2/AGENTS.md

yahoo-finance2

AGENTS.md802 starsChanged 5 months agoMITView on GitHub

This file applies to the whole repository. For fuller contributor guidance, read CONTRIBUTING.md; this file repeats the essentials agents are most likely to need during edits. - This is a Deno-first TypeScript library that is published to npm via generated output. - Source code lives under src/. Tests usually sit beside the module they cover and use fixtures from tests/fixtures/http. - The npm/ directory is generated package output. Prefer editing source files under src/ and regenerate npm output only when…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

16 rules. About 0 are common, 5 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run the full test suite with deno task test.

    line 20
  2. Very specific:

    Run deno task test:replay for a cache-only baseline that fails on missing fixtures and denies live network requests and fixture writes.

    line 21
  3. Very specific:

    Run FETCH_DEVEL=recache deno task test:recache for a paced live batch after an automatic replay-only baseline.

    line 23
  4. Very specific:

    Run a targeted test with deno task test path/to/file.test.ts.

    line 26
  5. Very specific:

    Run serial tests with deno task test:serial path/to/file.test.ts when debugging or limiting live Yahoo request concurrency.

    line 27
  6. Very specific:

    Run schema generation with deno task schema after changing exported interfaces marked with @yf-schema.

    line 29
  7. Very specific:

    Use deno fmt and deno lint for formatting and linting.

    line 31
  8. Distinctive:

    Before committing recached fixtures, inspect their HTTP status and payload.

    line 43
  9. Very specific:

    If a module file has @yf-schema, keep the generated .schema.json file in sync with deno task schema.

    line 51
  10. Distinctive:

    Prefer updating typed interfaces and validation schemas together with focused tests that cover the Yahoo response shape involved.

    line 53
  11. Distinctive:

    When Yahoo adds a response field, model it as required first.

    line 55
  12. Very specific:

    Keep types tight: use concrete types and observed literal unions.

    line 64
  13. Distinctive:

    Avoid editing generated directories, dependency directories, coverage output, or docs output unless the task explicitly requires it.

    line 89
  14. Distinctive:

    Check git status before and after changes, and do not overwrite unrelated local work.

    line 91
  15. Very specific:

    Use Conventional Commits with scope, e.g.

    line 96
  16. Very specific:

    Always end with: Co-authored-by: <Assistant> (<model>, reasoning: <high>) <<email>> email part may be ommitted.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
AGENTS.md

Agent Notes

This file applies to the whole repository. For fuller contributor guidance, read CONTRIBUTING.md; this file repeats the essentials agents are most likely to need during edits.

Project Context

  • This is a Deno-first TypeScript library that is published to npm via generated output.
  • Source code lives under src/. Tests usually sit beside the module they cover and use fixtures from tests/fixtures/http.
  • The npm/ directory is generated package output. Prefer editing source files under src/ and regenerate npm output only when the task explicitly calls for it.
  • The default development branch is dev.

Commands

  • Run the full test suite with deno task test.
  • Run deno task test:replay for a cache-only baseline that fails on missing fixtures and denies live network requests and fixture writes.
  • Run FETCH_DEVEL=recache deno task test:recache for a paced live batch after an automatic replay-only baseline. It aborts on 429 without rolling back earlier captures; generic getCrumb behavior tests remain replay-only.
  • Run a targeted test with deno task test path/to/file.test.ts.
  • Run serial tests with deno task test:serial path/to/file.test.ts when debugging or limiting live Yahoo request concurrency.
  • Run schema generation with deno task schema after changing exported interfaces marked with @yf-schema.
  • Use deno fmt and deno lint for formatting and linting.
  • Build npm output with deno task build:npm when generated npm artifacts are required.

Testing And Fixtures

  • Tests use fetch-mock-cache and cached HTTP fixtures for repeatability.
  • New module tests should call setupCache() from tests/common.ts when they touch Yahoo HTTP responses.
  • FETCH_DEVEL=nocache forces live network tests without cache.
  • FETCH_DEVEL=recache updates cache for failing tests. Be careful with fixture churn, and do not recache files ending in .static.json or .fake.json.
  • Before committing recached fixtures, inspect their HTTP status and payload. Do not commit transient failures such as rate limits, consent interstitials, timeouts, or upstream 5xx responses as replacements for successful fixtures.

Schema And Validation

  • TypeScript interfaces in module files are the source of truth for runtime validation schemas.
  • If a module file has @yf-schema, keep the generated .schema.json file in sync with deno task schema.
  • Prefer updating typed interfaces and validation schemas together with focused tests that cover the Yahoo response shape involved.
  • When Yahoo adds a response field, model it as required first. Make it optional only when other cached valid responses demonstrate that the field is absent, and add descriptive JSDoc when its meaning is clear. Do not guess semantics.

Repairing failures after recaching

  • Inspect failures and fixture HTTP status/payload before editing interfaces. Separate response-shape drift from HTTP/API errors, changed assertions, and runtime behavior issues. Do not loosen types to accommodate an error response.
  • Keep types tight: use concrete types and observed literal unions. Add ? only with successful fixture evidence of omission in the same response shape; distinguish omission from null, empty objects, and empty arrays. Check older, static, and fake fixtures as well as the newly recached fixtures, and record representative filenames in the change description.
  • Edit TypeScript interfaces, then regenerate every affected schema before retrying tests. The generator's timestamp check does not track imported type dependencies. Explicit file arguments force regeneration, e.g. deno task schema src/modules/quote.ts src/modules/options.ts; alternatively run deno task schema --force to regenerate all schemas. Also test consumers of shared schemas, such as historical after chart changes.
  • Automated fixture repair is limited to interfaces and generated schemas. If a failure needs runtime code, test expectations, or fixture changes, stop that particular repair, report the evidence and proposed action to the operator, and await feedback. Continue independent type/schema fixes while waiting and check for feedback before finishing. Do not disable validation or broaden a type simply to make a test pass.
  • Replay focused cached tests first, then the full suite. Inspect generated schema diffs and final Git status; do not recache again as part of verification.

Editing Guidelines

  • Preserve existing Deno import style, including .ts extensions for local imports.
  • Avoid editing generated directories, dependency directories, coverage output, or docs output unless the task explicitly requires it.
  • Check git status before and after changes, and do not overwrite unrelated local work.

Commit Messages

  • Use Conventional Commits with scope, e.g. "fix(quote):". This is important for semantic-release to publish correct versions.
  • The commit body should include a concise summary of motivation and changes.
  • Always end with: Co-authored-by: <Assistant> (<model>, reasoning: <high>) <<email>> email part may be ommitted. The rest is best effort, ask the user if not sure. For Codex, ~/.codex/config.toml has top level model and model_reasoning_effort.

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.