Foreword

Under DSH’s philosophy of “everything is a plugin,” it is not difficult for an agent to draft a PRD, but the hard part is the phase following the drafting: AI inferences easily get mixed with facts, no one explicitly makes the final call, and when upstream requirements change, downstream outputs have no way of knowing. The common approach is to have the model output a complete document all at once, deliver it as soon as it is written, with no state records in between and no confirmation actions. The dsh-ai-pm introduced below addresses this problem: it integrates the upstream pm-scaffold PRD workflow into DeepSeek Harness, where the agent is responsible for drafting and the confirmation authority is left to the real reviewer.

What is this

dsh-ai-pm is maintained by konwait12, under the MIT license, with package.json version 0.1.0. One-sentence positioning: Integrate the pm-scaffold PRD workflow into DeepSeek Harness. The agent side provides ai_pm_* model tools (init/status/entry/gate/reflow/skill/artifact), and the GUI side (Settings → Plugins → AI-PM) provides a requirements board and a non-bypassable human confirmation gate.

The plugin’s changes to the upstream are concentrated in the shell layer: the shell only contains package.json, cordis.patch.yml, and lib/. The upstream pm-scaffold’s src/, skills/, docs/, test/, and AGENTS.md are kept as-is, allowing for direct replacement during upstream upgrades. It is a web platform client (where dsh.client.platform in package.json is web) and is integrated via a patch in cordis.patch.yml.

Core Features

Agent Side: ai_pm_* Model Tools

After installation, the agent gains seven ai_pm_* model tools: init, status, entry, gate, reflow, skill, and artifact. These cover actions such as initialization, status checking, entry determination, machine gates, and change reflow. Corresponding commands can be found in the Typical Usage section below. review is not in this set of tools—the confirmation action is not exposed to the model.

GUI Side: Requirements Board and Human Confirmation Gate

The GUI entry is at Settings → Plugins → AI-PM, providing a requirements board. The gate rules are rigid: the machine gate can only produce ready_for_human_review, and confirmed can only be produced by a real reviewer in the GUI; AI cannot produce confirmed.

Workflow Mechanisms from Upstream pm-scaffold

The plugin integrates several core mechanisms from the upstream as-is:

  • Six-state knowledge annotation: every statement is annotated with FACT, DECISION, ASSUMPTION, AI_INFERENCE, UNKNOWN, or CONFLICT.
  • Bidirectional traceability and change closure: when reflow occurs upstream, downstream is cascaded and invalidated, triggering a re-run.
  • B3 forced closure at every stage and entry exploration: entry makes L0-L4 determinations based on material content.
  • 19 Skills (5 main + 9 sub + 4 branch artifacts + 1 capability), where each work item follows an 8-step loop: Preflight → Intake → Think → Clarify → Generate → Audit → Human Gate → Commit/Reflow.

Installation and Activation

Environment requirements: Node >= 20.18 (as per the engines field in package.json), peerDependencies is @deepseek-ai/dsh-tools ^0.1.0-rc.6; upstream core scripts require Python 3.10+ and rely only on the standard library.

First, fetch the source code from the GitHub repository locally, then execute the official installation command (which accepts a local directory path):

dsh plugin --profile web add ./ai-pm

An alternative way is to copy the plugin to ~/.dsh/profiles/web/node_modules/. After installing via either method, restart dsh web or click dsh-quick-refresh ⟳ for hot reload.

Typical Usage

From Skeleton to Human Confirmation

First, do initialization, then proceed step-by-step: init builds the requirements skeleton, original material is placed into 00-input/, then use status to check progress, entry for entry determination, and gate to run the machine gate. Finally, a real reviewer performs the review.

# 初始化需求骨架
python3 src/scripts/pipeline.py init REQ-NNN-my-feature

# 查看状态
python3 src/scripts/pipeline.py requirements/REQ-NNN-my-feature status

# 入口判定(L0-L4)
python3 src/scripts/pipeline.py requirements/REQ-NNN-my-feature entry

# 机器闸门
python3 src/scripts/pipeline.py requirements/REQ-NNN-my-feature gate --work-item project-background-goal

# 人工确认(review 不暴露为模型工具,由真实评审人执行)
python3 src/scripts/pipeline.py requirements/REQ-NNN-my-feature review \
  --work-item project-background-goal --decision approve \
  --reviewer "评审人姓名" --reviewer-id "飞书或组织稳定用户ID" \
  --reviewer-role "business_owner"

The --reviewer, --reviewer-id, and --reviewer-role for review are all required and must match the entries in 00-input/authorized-reviewers.json item by item. The machine gate stops at ready_for_human_review; confirmed can only be produced at this step.

Change Reflow

After upstream materials change, run reflow first as a rehearsal to confirm the scope of impact, then add --apply to execute the cascaded invalidation reflow:

python3 src/scripts/pipeline.py requirements/REQ-NNN-my-feature reflow

Only after adding --apply is it actually written, and invalid downstream artifacts will reflow and re-run.

Onboarding Material and Regression Testing

open src/toolkit/visualization/scaffold-flow.html
bash run_tests_mac.sh

The first opens the upstream visualization cockpit, serving as onboarding material for the project; the second performs full regression testing, suitable for running after integration or modification.

Applicable Scenarios and Notes

Suitable for developers or product teams working on product requirements on the DSH web profile, especially in scenarios requiring strict constraints on “AI drafting and human finalization,” traceable PRD items, and cascaded handling of upstream changes.

A few notes:

  1. The plugin runs with the permissions of the current DSH process; check the source code and license yourself before installing (this project is MIT).
  2. The requirements/ directory is generated at runtime and is gitignored—each user’s requirements are their own, so rebuild them anytime using init.
  3. There are two descriptions regarding agent-side tool naming: the README calls them ai_pm_* model tools, while package.json describes them as pipeline model tools. The actual implementation takes precedence.
  4. The human gate is intentionally designed: the agent cannot replace the reviewer to complete confirmation. Register the reviewer in 00-input/authorized-reviewers.json before integrating.

Summary

What dsh-ai-pm does is not complicated: it installs a PRD workflow with six-state annotation, a human gate, and change reflow into DSH. The agent is responsible for drafting and checking, while confirmation authority remains with the real reviewer. If your PRD process also requires this level of constraint, it is recommended to read the source code before deciding whether to integrate it.

  • Plugin Directory Page: https://www.skillhub.cn/plugins/konwait12/dsh-ai-pm (Third-party community directory, no official affiliation with DeepSeek / Huanfang, categorized as “Workflow” in the directory)
  • GitHub Repository: https://github.com/konwait12/dsh-ai-pm