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.
- fund-researchSkill
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
- Distinctive: line 25
Research only: Every tool description and report carries 仅供研究、不构成投资建议.
- Very specific: line 28
This plugin registers no waterfall listeners: If one is ever added, allow/passthrough MUST call next().
≈ “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.
Files
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-injectstoolsandstorageDomain(shipped profiles compose the storage stack viadsh-base; the bundle patch mounts only the plugin row);jobs/skills/systemPrompt/dataQualityare optionalctx.getlookups so leaner compositions still activate. Asyncapply: resolves config, opens thedsh_fund_researchdomain, 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 + explicitresolveConfig(no hidden?? defaultin 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 (pingzhongdataJS block, F10jjccholdings, F10jjjlmanager page, push2 quotes with the configurablepush2delayfallback host). Remote code is never evaluated; structural drift throwsSourceParseErrornaming 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.jsonbefore verification, thenreport.md+manifest.json).src/verify-bridge.ts— the frozendsh-data-qualitycontract consumed viactx.get('dataQuality')(local structural interface, never imported, never injected) plus the isomorphicbuiltin-fallbackchecker.src/tools/*.ts—fund_snapshot,fund_research(+ thefund-reportbackground-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; REALContext/SessionStore/Session/ToolRuntime/LocalJobRegistryand 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.tsis 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-qualitywhen present, elsebuiltin-fallback). Computed values live undercomputed.*in the sealed snapshot so the check is exact; anyone can recompute them fromraw.*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
Configfields (cordis.patch.yml comments + the five-language README table). - Session events are log-only audit.
fund-research/snapshot/fund-research/reportride the adaptive gate insrc/events.ts, which can append only when the host admits out-of-repo types — either its known-type set covers the vocabulary or itsSession.appendtakes anignorableenvelope. From0.1.2-alpha.1on (including0.1.5-alpha.1) neither holds:KNOWN_SESSION_EVENT_TYPESis a build-generated in-repo catalog that excludes out-of-repo events by construction, andSession.appendhas noignorableoption — so no event is appended and the tool results plus sealed artifacts remain the reconstructable audit trail. Never append unconditionally: a0.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/cordisstays 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
typecheckresolves@deepseek-ai/*through the installed 0.1.7-rc.2 peers;typecheck:ciclearsskipLibCheckand enablesverbatimModuleSyntaxagainst the published types;typecheck:checkoutcompiles against the local harness checkout's built types throughtsconfig.checkout.json(the only ruler withpaths). All three must stay green.- oxlint discovers files only after
git init(the parent checkout's.oxlintrc.jsonotherwise matches nothing here). test/composition.spec.tsdrivesscripts/loader-runner.mjsin a child process.cordis-plugin-loader1.0.6 no longer makesloader.await()reject when a row'sapplythrew (Entry._reload()swallows the throw intofiber._errorin the same turn it resolvesfiber.inertia), so the runner re-awaits everyFAILEDrow —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=1disables 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(mirrorpackage.jsonkeywords). - License is Apache-2.0 (
LICENSE+ the package.jsonlicensefield).THIRD_PARTY_NOTICES.mddocuments the build-time dependencies.
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
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.

