Preface

In the plugin ecosystem of DeepSeek Harness (DSH), the primary way to extend host capabilities is to install community plugins. When dealing with materials for a course or a paper, simply reading the outline and courseware often makes it difficult to quickly distill their design logic—that is, “what is taught first and what is taught later,” as well as “why each step is placed there” and “how the steps connect to one another.”

dsh-course-logic-extractor plugin aims to solve this problem. It reads course or paper materials (outlines, notes, courseware, PDFs, and so on), reconstructs their design logic algorithmically, and ultimately delivers a self-consistent logical chain analysis report, a learning roadmap, and a process canvas. This helps learners see the overall picture before diving deeply into the content.

Installation and Activation

Installing the plugin requires a single command. After installation, the plugin automatically distributes its preset to the local environment.

  1. Run the installation command:
    dsh plugin --profile web add github:ShadowBruceMeaningLau/dsh-course-logic-extractor
  1. Restart dsh web (or any interface that uses agent presets).
  2. When creating a new session, select “Course Logic Extractor” from the preset selector to use it.

Core Features

The plugin provides three input modes and includes built-in intent recognition and iterative confirmation mechanisms.

Three Input Modes

  • Direct analysis: Provide the material path directly to perform standard logic extraction.
  • Paper mode: Conduct dual-perspective analysis, taking into account both research logic and learning logic.
  • Autonomous material finding: When no materials are available, follow an iterative confirmation workflow based on learning needs.

Entry Routing (Intent Understanding)

The plugin analyzes the user’s first message. It automatically routes based on the message content:
* A material path is provided: use the standard workflow.
* A learning need is expressed (any intent expressing “wanting to acquire knowledge/skills/understanding” qualifies): use the autonomous workflow.
* No information is provided: first introduce how to use this agent.

Autonomous Material Finding (Iterative Confirmation)

In no-material mode, the workflow is divided into two stages, and each stage can exit only when the user explicitly indicates they are “completely certain.”

  • Phase 1: Establish the capability point list
    Build a multi-level tree structure. First-level parallel capability points contain subordinate sub-capability points. Decompose overly broad capability points into learnable, verifiable leaf nodes, and mark prerequisite/successor dependencies and mastery criteria. A capability point dependency diagram must be produced.
  • Phase 2: Establish the material list
    First confirm learning format preferences (book-based self-study / video-based / AI decides / other).
    Generate a fixed seven-column list: covered capability point, name, source, link/location, format, value assessment, and status.
    The material delivery priority is: local first → network download → missing items are decided by the user.
    Planning content is archived in the 0-规划/ directory.

Material Pipeline

When handling non-text materials such as PDFs, the plugin starts the following pipeline:
1. PDF rendering: Use the built-in MuPDF (already packaged, no network installation required) to render PDFs into high-resolution page images.
2. OCR transcription: Call the Zhipu GLM-OCR layout_parsing interface to perform transcription.
3. Quality reconciliation: Check for issues such as missing pages, blank pages, and formula pairing, and generate a quality report.
4. Direct-output archival: Merge the transcribed content and archive it in the delivery directory.
5. Optimized version (optional): After direct output, ask the user whether it is needed, and generate an optimized version for easier reading in Obsidian (separate from other deliverables).

Deliverables

The plugin ultimately delivers the following:
* Logic chain analysis: Includes seven sections, frontmatter, and a self-check report.
* Learning roadmap: Guides the learning path.
* Process diagram canvas set: Generates Obsidian .canvas files, including a module map, learning roadmap, and so on.
* Evidence layer and material layer: Includes evidence extraction files for the chunked seven-element structure and material archives.

Configuration and Precautions

OCR Key Configuration

The transcription feature depends on Zhipu GLM-OCR and requires an API key to be configured. If it is not configured, transcription is unavailable, but this does not affect other features (such as inventory and plain-text analysis).

Two configuration methods are supported:
1. Environment variable: ZHIPU_API_KEY.
2. Configuration file: Add the field {"zhipuApiKey": "…"} to ~/.dsh/free-vision.json.

Local Modification Protection

The plugin is idempotent. If a preset without the .dsh-plugin marker already exists at the target location (for example, a version you wrote yourself), the plugin will not overwrite it. Only copies installed by the plugin itself are updated during version upgrades.

Portability

The plugin body includes the necessary dependencies (such as node_modules/mupdf) and requires no network installation steps. The entire preset references official packages via relative paths and is fully portable.

Directory Structure and Deliverables

Plugin Directory Structure

After installation, the plugin body contains the following structure:
* package.json: Plugin declaration.
* cordis.patch.yml: Host-side mounting configuration.
* lib/index.js: Host side, responsible for idempotently writing the preset to disk.
* preset/course-logic-extractor/: Contains preset composition files and the skill directory.

Runtime Delivery Directory

During runtime, a 课程逻辑交付/<课程名>/ directory is generated under the current directory and contains:
* 0-规划/: Capability point list, dependency diagram, and material list.
* 1-报告/: Logic chain analysis, learning roadmap, and canvas set.
* 2-证据/: Evidence extraction files.
* 3-材料/: Page render images, transcription drafts, direct-output drafts, and quality reports.