Standalone DeepSeek Harness plugin repository (dsh-data-quality). Development follows the dsh-plugin-guide skill and the official plugin contract; this file records repo-local decisions.
src/index.ts— function-plugin contract (name/inject/Config/apply; NO default export). InjectstoolsandstorageDomain. Asyncapply: resolves config, opens thedata_qualitydomain, constructs the service (publishesctx.dataQuality), registers the three tools, and closes the domain from onectx.effectdisposer.src/service.ts— the Service Definition: the frozen cross-pluginCitationCheckRequest/CitationCheckResultcontract (byte-stable; change only with an ecosystem migration), the internal request/report types, the abstractDataQualityService, and theContextdeclaration merge.src/provider-local.ts— the local deterministic Provider: orchestrates loading, engines, persistence, and the adaptive session events. Uses TypeScriptprivate(never ECMA#fields — cordis proxies service access and#fields throw on the proxy receiver).src/dataset.ts— workspace-confined path resolution, size/row guards, hand-rolled CSV/TSV/JSON/JSONL parsers, deterministic systematic sampling, strict scalar parsers. Cells areJsonValue.src/profile.ts/src/clean.ts/src/verify.ts— the pure engines. No I/O, no clock, no RNG; timestamps and the freshness clock are injected.src/config.ts— Schemastery schema + explicitresolveConfig(no hidden?? defaultin run paths). Numeric bounds fail loud at mount.src/store.ts— thedata_qualitystorage-domain declaration (zod record schema) and the deterministic report-key format.src/events.ts— thedata-quality/*SessionEventMapmerge plus the adaptive append gate.src/present.ts— display truncation for tool-facing row payloads (safety invariant, not a tunable).src/tools/*.ts— the threedefineToolConsumers; all computation goes through the service layer,workspaceOf(exec)mirrors the official fs tools' session-cwd rule.scripts/—prepare.mjs(build),fix-dts.mjs,verify-self-contained.mjs,verify-artifacts.mjs(also greps for leftover.tsimports),check-readme-sync.mjs(five-language gate),loader-runner.mjs(real Loader composition + keyless three-tool chain),release.mjs,changelog-section.mjs.test/— vitest; REALContext/SessionStore/Session/SystemPrompt/ToolRuntimeand the REAL storage seam (dsh-storage + dsh-storage-json + dsh-storage-domain) from the 0.1.1-rc.2 peers. No hand-written service mocks. Engine specs are pure.fixtures/— small dirty datasets for the loader-runner smoke.
- Deterministic computation. Same input, same output; floats never compare with raw
===(relative tolerance); the only clock is injected (nowfor reports andfreshnessdefaults). - Session events are adaptive. The rc.2
Session.appendhas noignorableflag and there is no plugin event-registration surface, so appending an unknowndata-quality/*type would make the persistence coordinator refuse the log on restore.src/events.tsappends only when the host knows the vocabulary or supports theignorableappend flag (source probe, fails safe); the storage-domain report is always the durable copy. - Path confinement. Dataset/output paths resolve inside the session workspace (
verifyCitationsuses the configuredworkspaceRoot); both sides go throughpath.resolvebefore the containment check (Windows slash trap). - Fail loud. Misconfiguration, malformed files, unknown columns, invalid rules, oversized inputs, and path escapes all throw actionable errors; a failing
data_verifyverdict is a normalpassed: falseresult, never a tool error. - No tunables hardcoded. Every knob is a validated
Configfield with a default insrc/config.ts, an inline comment incordis.patch.yml, and a row in the five-language README configuration table.MAX_CELL_TEXTis a documented display-safety invariant, not a tunable. - This plugin registers no waterfall listeners. If one is ever added, allow/passthrough MUST call
next().
pnpm run typecheck && pnpm run typecheck:ci && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && node scripts/check-readme-sync.mjs && pnpm pack
typecheckresolves@deepseek-ai/*through the installed 0.1.1-rc.2 peers;typecheck:ciclearsskipLibCheckand enablesverbatimModuleSyntaxagainst the published types. Both must stay green.
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.
- 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 and the##headings stay in English (the sync gate enforces structure and config keys).scripts/check-readme-sync.mjs(CI) is the enforcer. - GitHub topics
dsh,dsh-plugin,deepseek-harness,cordis,data-quality,data-cleaning,data-profiling,data-verification(mirrorpackage.jsonkeywords). - License is Apache-2.0 (
LICENSE+ the package.jsonlicensefield).THIRD_PARTY_NOTICES.mddocuments the build-time dependencies.