nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:duyanta123/dsh-test-insight
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
A test-insight plugin for DeepSeek Harness: builds reviewable test plans (TEST-PLAN.md) and isolated test drafts (review-only) from repository facts and change risk.
Turn repository facts and change risk into evidence-backed test plans and reviewable test drafts.
dsh-test-insight covers the "repository facts + change risk → test plans and drafts" step. The core scanning capability is provided by dsh-repo-scanner (an npm dependency; scanner source is never copied); this plugin contributes test evidence, gap detection, risk ranking, test design, and report generation.
It answers:
Boundaries:
DRAFT ONLY; passing a syntax check is not passing the tests.As a DSH plugin:
dsh plugin --profile web add "github:duyanta123/dsh-test-insight#v1.0.0-rc.4"
Or from npm (as a library or standalone CLI):
npm install dsh-test-insight
Compatibility tiers: the standalone CLI / library requires Node.js >= 20.11; as a DSH 0.2.1-rc.2 plugin it is verified with Node.js >= 22.19. Run npm run test:compat to execute an isolated-profile add, dump-config, and startup smoke test.
After installing, restart dsh --profile web and use it through the test-insight-runbook skill.
Tell the agent "generate a test plan for /path/to/repo" or "analyze the test gaps in this change". The skill follows its runbook: collect mode and targets → read and validate scanner facts → build the test/module/symbol/entry mapping → separate facts from inference → generate TEST-PLAN.md and test-insight.json.
# Whole-repo analysis: test mapping, gaps, risk ranking
dsh-test-insight . --mode all --output reports --format both
# Change analysis: working-tree changes as input, warnings fail the run
dsh-test-insight . --mode change --working-tree --strict
# Targeted analysis: generate test drafts for a specific file/symbol
dsh-test-insight . --mode target --target src/auth.js:authenticate --generate-drafts
import { analyze, writeReportFiles } from 'dsh-test-insight/core';
const report = await analyze({ repoPath: '.', mode: 'all' });
// report is what lands in test-insight.json: mapping, gaps, risk, performance budget
| Option | Default | Description |
|---|---|---|
<repo> |
- | Target repository path |
--mode all\|change\|target |
required | Analysis mode: whole-repo / change-driven / targeted |
--all |
- | Shortcut for --mode all |
--target <path[:symbol]> |
- | Target-mode input, repeatable |
--working-tree |
- | Change-mode input: git status --porcelain -uall (mutually exclusive with --diff/--base) |
--diff <file> / --base <ref> / --head <ref> |
- | Change-mode inputs: diff text or Git refs |
--output <path> |
- | Output file or directory |
--format json\|markdown\|both |
- | Output format |
--generate-drafts |
off | Generate isolated review-only test drafts |
--draft-output <path> |
- | Draft directory (requires --generate-drafts, hidden directory by default) |
--execute-tests |
off | Explicitly authorize test execution (requires --test-command) |
--test-command <preset\|cmd> |
- | Preset npm-test\|pytest\|go-test\|node-test or a shell-free argv array |
--force |
off | Allow overwriting existing output files |
--strict |
off | Non-zero exit when warnings exist |
| Artifact | Description |
|---|---|
TEST-PLAN.md |
Structured test plan: test mapping, evidence levels, risk targets and gaps |
test-insight.json |
Machine-readable report (schema in schema/test-insight.schema.json), records shared cache, cold/hot hits, end-to-end performance budget, and the actual scanner version |
| Draft directory | Isolated review-only drafts (default .dsh/test-insight/drafts), atomic writes with overwrite protection; never overwrites existing tests |
Reports also record recognized test frameworks and candidate test commands (test_frameworks / suggested_commands, each with source and confidence); §7 of TEST-PLAN.md shows them as display-only suggestions. A complete example report lives at examples/test-insight.example.json (snapshot-tested in test/snapshot.test.mjs).
--execute-tests and an allowlisted --test-command (preset or shell-free argv); execution runs with a fixed working directory, timeout, and output limits only.--force; drafts never overwrite existing tests.--mode change says "Git change inputs require ..."?
Change mode requires a change input: exactly one of --working-tree, --diff, or --base; --working-tree cannot be combined with --base/--head/--diff.
No test drafts generated?
Draft generation needs --generate-drafts (in target mode); drafts go to a hidden directory by default — set it with --draft-output. Drafts are review-only and do not imply passing tests.
--execute-tests rejected?
By design: test execution requires --execute-tests and --test-command together, and the command must hit the allowlist (a preset or a shell-free argv array).
Old sessions won't open after upgrading the DSH host to 0.1.5.x? The Session format V3 migration is irreversible and is host behavior; back up session logs before upgrading the host (see the 1.0.0-rc.2 entry in CHANGELOG.md).
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: ai-agent。