dsh-opticforge: A KB-first DSH Plugin for Optoelectronic Engineering Tasks

Preface

In DeepSeek Harness (DSH), when connecting tasks related to optical design, alignment, calibration, or schemes, agents often have no shortage of compute and tools, but are easily stuck on four matters: which dimensions must be answered, whether there is a reference for each dimension, what order to proceed next, and how to accept delivery before completion. Simply “searching a paragraph online first” often easily hides gaps within the main text; citations, units, and assumptions reveal the problem when paired.

OpticForge (wbmgggg/dsh-opticforge), maintained by community maintainer WBMGGGG, is positioned as a knowledge-base-first task intake and capability routing system: it does not calculate for you, does not search the web for you, and does not write files. Instead, it collects problems into executable mission packages, telling the execution layer what to check, when it is allowed to go online, and which gates the delivery must pass. The current version is 3.1.1 (pure Node.js, engines.node >= 20, zero runtime dependencies). The community directory SkillHub classifies it as a “Memory” type plugin; see the GitHub repository for source code and documentation.

What is it

One sentence: OpticForge is an optical engineering task assistant plugin running on top of DSH. Using its built-in KB and five read-only tools, it strings together a fixed workflow of “Dimension — Evidence — Plan — Acceptance”.

Its difference from “Q&A style knowledge bases” lies in three constraints (as stated in the original README):

  • No first go online: It builds a KB baseline first, only allowing external retrieval when conditions such as KB gaps, standard versions, vendor parameters, price and timeliness meet web_gate.
  • No hide gaps: Missing dimensions are marked gap, original gaps go into library_gaps, secondary sources are marked untrusted, and adjacent dimensions are not used to substitute.
  • No give internal fields to user: Since 3.1.1, the skeleton exposed to the user is fixed at five segments (Conclusion, Severity Table, Routing Criteria, Route, Verification and Pending Parameters). Sources only cite literature, standards, manuals, or URLs, never chunk numbers or KB hierarchy levels.

Knowledge Base and Architecture (Only one v3)

The most easily misinterpreted point is: the “40 sections / 324 entries” seen at runtime is not a second architecture, but the subset that is filled and citable under OpticForge知识库-v3纯净版.

Layer Meaning
L1 v3 coverage baseline: 8 domains / 54 families / ~470 leaf topics; 16 topic cards and 34 formula cards are the target scale
L2 Runtime evidence layer: 40 source sections (A–I) / 324 entries / 308 entries present
L3 308 concept cards: one card per present entry, mapped to v3 domains and families

The 40 source sections are numbered by data source (A–E vendor rewrites, F basics, G engineering, H frontier, I scenarios), and map many-to-many with the 54 v3 families. Fact sources are in BOARD_MAP of scripts/build-concept-cards.mjs. The current mapping covers 39/54 families; the remaining 15 families are handled as gaps without generic text filling.

Overlaying the runtime KB with read-only data also includes:

  • data/assist-playbooks.json: 16 topic cards, 98 dimension declarations
  • data/concept-cards.json: 308 atomic concept cards
  • data/cross-dimensions.json: 6 generic dimensions (Principle / Design / Calculation / Implementation / Verification / Risk)

calc_specs selects from 19 formula cards; the plugin itself does not provide a calculator; the execution layer records input/output and units according to the formula cards.

Core Functions: Five Tools and Three-Layer Response

The plugin exposes five tools to DSH via a Cordis patch, returning a unified { ok, kb_version, action, ... } envelope:

Tool Purpose
opticforge_assist Main entry: briefing, alignment matrix, dimension evidence, phased plan, retrieval package, acceptance and five-part skeleton
opticforge_verify Performs delivery self-check on text or .md/.txt/.json/.csv (0–100 score and issue list)
opticforge_search BM25 retrieval of KB, returns chunk, excerpt and source
opticforge_get Retrieves complete entry by chunk_id
opticforge_docs Lists the 40 sections and titles

Conceptually, task processing is divided into three layers (consistent with the README table):

  1. Evidence Layer: Collects evidence based on required answer dimensions; hits include source and excerpt; missing basis is marked gap.
  2. Routing Layer: Activates multiple playbooks, fuses dimensions, inventories local Skills/MCPs/workspaces, and generates a plan with dimension_id and coordinates_with.
  3. Acceptance Layer: Checks citations, quantity, structure, formula trace, dimension coverage, credibility gates, and the five-part presentation.

After installation, the DSH Skill skills/opticforge-task is linked to ~/.dsh/skills/opticforge-task, making it convenient to call the above tools in dialogue according to the Skill convention.

Installation and Enablement

The repository does not currently publish npm packages. The README recommends the local install script (modifying profile dependencies, bundles, and Skill directory links):

git clone https://github.com/WBMGGGG/dsh-opticforge.git
cd dsh-opticforge
node scripts/install-local.mjs            # writes profile dependencies + bundles + directory links
node scripts/install-local.mjs --dry-run  # preview only, no file changes
node scripts/install-local.mjs --uninstall

After installation, restart DSH to take effect; subsequently, if only code inside the repository or data/ is modified, a restart will load the new version. The uninstall script only deletes the Skill symlink and will not overwrite existing normal directories.

Note: DSH’s dsh-market directory comes from the plugins.json maintained by a standalone site; the README notes that the OpticForge entry was in an unmerged PR state, so it might not be searchable by name in the market before merging, which is unrelated to whether an npm package is published. The community directory SkillHub has no official affiliation with DeepSeek or Fenxiang, but can be used as a third-party listing page.

Security Tip: The plugin runs with the current DSH process permissions. Please review the source code, cordis.patch.yml, and the MIT license yourself before installation to ensure the exposed tool scope fits your environment policies.

Typical Usage

1. Use assist to handle complex scheme problems

The README provides reproducible input parameter examples (JSON field names can be kept consistent to call in the tool):

{
  "problem": "Design a push-broom hyperspectral imager with a wavelength range of 400–1000 nm, spectral resolution 5 nm, spatial resolution 0.5 m@1 km, swath width 30 km, providing a spectral splitting scheme, indicator budget, and calibration process",
  "deliverable": "Scheme report",
  "workspace": "D:/AI/projects/hyperspectral",
  "known_capabilities": ["sheet", "word", "general_search"]
}

assist typically activates multiple topic cards, fusing dimensions such as spectral splitting, aberrations, detectors, and calibration, and returns fields like brief, alignment (containing coverage_matrix and verdict), dimensions, plan.steps[], search_pack (containing external query groups marked with web_gate), handoff, and acceptance. The execution layer retrieves the KB based on this, goes online only when gates allow, and completes drafting and calculation using local Skills.

2. verify before delivery

When the draft is plain text or Markdown, you can directly call opticforge_verify. For docx/pdf, you must first export to .md or .txt using a word/pdf class Skill before checking. For scheme-type deliverables, you can set presentation: true to force checking of the five-part presentation structure.

3. Evidence query

When you need to verify a specific fact, use opticforge_search to retrieve, then use opticforge_get to pull the complete nine-field entry; opticforge_docs can help clarify the 40 section boundaries first (the plugin explicitly does not cover topics like lithography and space optics).

Applicability and Notes

Suitable for: Developers performing optical system design, alignment, metrology, spectroscopy/hyperspectral, tolerance, and reliability argumentation within DSH or agent pipelines; people who want task steps and dimension coverage to be traceable and have text-level gates before delivery.

Not suitable as: It is not optical design software, nor an online calculator; numerical calculation and web actions are still completed by the execution layer and other Skills/MCPs. Compiled KB entries are engineering compilations; external citations should check the original text according to the entry’s source; gap entries can only indicate “no basis here” and cannot be written into a report as facts.

Content Boundaries: Runtime coverage is limited to the 40 sections listed in README §5; verify will classify citations to non-present entries as errors. Online results must pass the credibility gates (primary source grading, multi-source cross-check, conflict_with_kb, timeliness, etc.); secondary sources are not counted in coverage.

Closing

OpticForge turns optical tasks from “finding a paragraph” into a KB-first workflow of “evidence by dimension, routing by plan, delivery by gates,” supported by 5 tools and 308 citable facts under the v3 architecture for the DSH execution layer. To view listing information and classification, you can open the SkillHub directory page; for installation, contract details, and test commands, refer to the GitHub README (including the Chinese version README.zh.md).

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye