agentleFS
PerryLinkPerryLink/dsh-fund-research/AGENTS.md

dsh-fund-research

AGENTS.md68 starsChanged 3 months agoApache-2.0View on GitHub

Standalone DeepSeek Harness plugin repository (dsh-fund-research). Development follows the dsh-plugin-guide skill and the official plugin contract; this file records repo-local decisions.

  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 33,315 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 repositoryOne other file it gives its agents.

The file

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

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Research only: Every tool description and report carries 仅供研究、不构成投资建议.

    line 25
  2. Very specific:

    This plugin registers no waterfall listeners: If one is ever added, allow/passthrough MUST call next().

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 42,283 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

AGENTS.md

Standalone DeepSeek Harness plugin repository (dsh-fund-research). Development follows the dsh-plugin-guide skill and the official plugin contract; this file records repo-local decisions.

Layout

  • src/index.ts — function-plugin contract (name/inject/Config/apply; NO default export). Hard-injects tools and storageDomain (shipped profiles compose the storage stack via dsh-base; the bundle patch mounts only the plugin row); jobs/skills/systemPrompt/dataQuality are optional ctx.get lookups so leaner compositions still activate. Async apply: resolves config, opens the dsh_fund_research domain, builds the shared polite fetcher, registers the two tools as effects, then the prompt section and the bundled skill provider when those services are present.
  • src/config.ts — Schemastery schema + explicit resolveConfig (no hidden ?? default in run paths). Bounds fail loud at mount.
  • src/model.ts — the owned JSON model: FundSnapshot (raw + computed + provenance), ReportManifest, TraceRow. Exactly what gets sealed to disk and validated by the domain zod schema.
  • src/sources/eastmoney.ts — polite collection (PoliteFetcher: shared pacing clock, timeout, exponential-backoff retries) and strict parsers (pingzhongdata JS block, F10 jjcc holdings, F10 jjjl manager page, push2 quotes with the configurable push2delay fallback host). Remote code is never evaluated; structural drift throws SourceParseError naming the source and field.
  • src/sources/snapshot.ts — acquisition policy: offline reads (domain first, then newest on-disk version snapshot), TTL reuse, compute-on-collect, domain persistence.
  • src/metrics/*.ts — the deterministic pure functions (performance decomposition, holdings penetration, style attribution, manager profile). No model arithmetic anywhere.
  • src/report.ts — section assembly (gap-aware), the traceability appendix, and the versioned seal (snapshot.json before verification, then report.md + manifest.json).
  • src/verify-bridge.ts — the frozen dsh-data-quality contract consumed via ctx.get('dataQuality') (local structural interface, never imported, never injected) plus the isomorphic builtin-fallback checker.
  • src/tools/*.ts — fund_snapshot, fund_research (+ the fund-report background-job producer), and the shared pipeline (shared.ts).
  • skills/fund-research/SKILL.md — the methodology skill (口径定义、缺口处理、合规话术); computation stays in code.
  • scripts/ — prepare.mjs (build), fix-dts.mjs, verify-self-contained.mjs, verify-artifacts.mjs, check-readme-sync.mjs (five-language gate), release.mjs (bump + stamp + gate + commit + tag, never pushes), changelog-section.mjs.
  • test/ — vitest; REAL Context/SessionStore/Session/ToolRuntime/LocalJobRegistry and the REAL storage seam over an in-memory backend from the 0.1.7-rc.2 peers. The network is replaced only at the fetch boundary by saved real-response fixtures (fixtures/). test/e2e.live.spec.ts is an opt-in REAL-network E2E (LIVE_E2E=1 pnpm run test:e2e) that seals a report for 161725 and spot-checks five numbers against the snapshot and a second independent fetch.
  • fixtures/ — real collected payloads for fund 161725 (pingzhongdata block, F10 holdings/manager pages, per-stock quotes). .tmp/ collector scripts refresh them.

Hard rules applied here

  • Every report number traces to the sealed snapshot. The appendix table maps report value ↔ snapshot JSON path ↔ verification verdict (dsh-data-quality when present, else builtin-fallback). Computed values live under computed.* in the sealed snapshot so the check is exact; anyone can recompute them from raw.* with the documented口径.
  • Gaps are declared, never filled. A failed/degradable source adds a gap label; the section renders an explicit 数据缺口 declaration. No invented numbers.
  • Research only. Every tool description and report carries 仅供研究、不构成投资建议; no trading, no predictions, no target prices.
  • No tunables hardcoded. Base URLs, pacing, timeout, retries, TTL, risk-free rate, offline, report root are all validated Config fields (cordis.patch.yml comments + the five-language README table).
  • Session events are log-only audit. fund-research/snapshot / fund-research/report ride the adaptive gate in src/events.ts, which can append only when the host admits out-of-repo types — either its known-type set covers the vocabulary or its Session.append takes an ignorable envelope. From 0.1.2-alpha.1 on (including 0.1.5-alpha.1) neither holds: KNOWN_SESSION_EVENT_TYPES is a build-generated in-repo catalog that excludes out-of-repo events by construction, and Session.append has no ignorable option — so no event is appended and the tool results plus sealed artifacts remain the reconstructable audit trail. Never append unconditionally: a 0.1.5+ reader refuses a stored log carrying an unknown non-ignorable type. A failed append never changes a tool outcome.
  • This plugin registers no waterfall listeners. If one is ever added, allow/passthrough MUST call next().
  • Cordis identity. @deepseek-ai/cordis stays a peerDependency (+dev); scoped/unscoped mixing splits the identity.

Checks

pnpm run typecheck && pnpm run typecheck:ci && pnpm run typecheck:checkout && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && node scripts/check-readme-sync.mjs && pnpm run check:lockfile && pnpm pack

  • typecheck resolves @deepseek-ai/* through the installed 0.1.7-rc.2 peers; typecheck:ci clears skipLibCheck and enables verbatimModuleSyntax against the published types; typecheck:checkout compiles against the local harness checkout's built types through tsconfig.checkout.json (the only ruler with paths). All three must stay green.
  • oxlint discovers files only after git init (the parent checkout's .oxlintrc.json otherwise matches nothing here).
  • test/composition.spec.ts drives scripts/loader-runner.mjs in a child process. cordis-plugin-loader 1.0.6 no longer makes loader.await() reject when a row's apply threw (Entry._reload() swallows the throw into fiber._error in the same turn it resolves fiber.inertia), so the runner re-awaits every FAILED row — Fiber.await() still rethrows the stored error — and rethrows the first failure. Without that walk the invalid-config negative is judged on the downstream symptom ("tool is missing from the tools registry") instead of the cause. The two reports are mutually exclusive — the rethrow precedes the registry check — and the suite asserts exactly that, so a symptom-only stderr fails. DSH_LOADER_RUNNER_NO_RETHROW=1 disables the walk for re-measurement only.

Release

node scripts/release.mjs <x.y.z> bumps package.json + src/version.ts, stamps the CHANGELOG [Unreleased] section, re-runs the full gate, and commits + tags (never pushes). git push origin main --follow-tags triggers .github/workflows/release.yml, which re-runs the gate, publishes to npm with provenance, and creates the GitHub Release from the stamped CHANGELOG section.

Docs

  • Five-language READMEs (README.md, README-zh.md, README-es.md, README-pt.md, README-hi.md) — keep all five in sync; the English file is the source of truth. scripts/check-readme-sync.mjs (CI) enforces section structure and configuration-table keys.
  • GitHub topics dsh, dsh-plugin, deepseek-harness, cordis, fund-research, mutual-fund, investment-research, finance, research-report (mirror package.json keywords).
  • License is Apache-2.0 (LICENSE + the package.json license field). THIRD_PARTY_NOTICES.md documents the build-time dependencies.

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.