@skyf0xx/hedgehog-core-deepseek-harness 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyf0xx/hedgehog-core-deepseek-harness",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Hedgehog's deepseek-harness core: a pinned DSH/Cordis plugin workspace, a tool-plugin generator, and the skills that drive building DeepSeek Harness plugins with Hedgehog's build discipline.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -56,6 +56,11 @@ Everything under this package's `workspace/`, copied to the repo root:
|
|
|
56
56
|
`dsh-credentials-local` provider reads from a project-root `.env`.
|
|
57
57
|
Copy to `.env` and fill in before any layer past `wiring` runs; `.env`
|
|
58
58
|
itself is gitignored, never committed.
|
|
59
|
+
- `README.md` — a thin index: what the workspace is, plus a `## Plugins`
|
|
60
|
+
section. `pnpm generate:tool <name>` appends one bullet here per new
|
|
61
|
+
plugin, right after the `<!-- plugin-readme-links -->` marker, linking
|
|
62
|
+
to that plugin's own generated README — this file is never hand-edited
|
|
63
|
+
beyond that.
|
|
59
64
|
|
|
60
65
|
`node_modules` is not part of the copy — `pnpm install` regenerates it
|
|
61
66
|
from the committed `pnpm-lock.yaml`.
|
|
@@ -114,11 +119,16 @@ are typecheck/structural checks against source files, not a real DSH
|
|
|
114
119
|
boot. `smoke` (and later, `dsh web`) does: it boots a real profile and
|
|
115
120
|
calls the model, so it needs `DEEPSEEK_API_KEY` resolvable by DSH's
|
|
116
121
|
`dsh-credentials-local` provider. The simplest path is a `.env` file at
|
|
117
|
-
the
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
the repo root — `.env.example` documents this.
|
|
123
|
+
|
|
124
|
+
Copy `.env.example` to `.env` yourself, leaving `DEEPSEEK_API_KEY=`
|
|
125
|
+
blank — do not put a value in it. Never ask the user to paste the key
|
|
126
|
+
into the conversation; a live credential has no reason to pass through
|
|
127
|
+
chat history or logs. Tell them the file exists and where, and that
|
|
128
|
+
they need to fill in the value directly in their editor or filesystem
|
|
129
|
+
before `harness-eng` reaches a plugin's `smoke` layer — raise this now
|
|
130
|
+
rather than letting it surface as a late failure three layers in. `.env`
|
|
131
|
+
itself is gitignored, never committed.
|
|
122
132
|
|
|
123
133
|
### 5. Install
|
|
124
134
|
|
|
@@ -31,13 +31,19 @@ is the cross-plugin integration check the per-plugin layers can't be.
|
|
|
31
31
|
## Planning intake (Phase 0, before any build layer)
|
|
32
32
|
|
|
33
33
|
Run once per new plugin, before that plugin's `scaffold` task can be
|
|
34
|
-
claimed.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
claimed. Always surface this as an explicit question to the user, even
|
|
35
|
+
when confident which answer fits — never infer the answer from the
|
|
36
|
+
plugin's apparent complexity and proceed without asking: mechanical
|
|
37
|
+
intake (name + goal + outcome, fast) or the full BMAD shelf
|
|
38
|
+
(brainstorming → brief → PRD → UX spec, the same procedure
|
|
39
|
+
`full-stack-app`/`pwa-app` run, archived to `.hedgehog/BMAD/`)? A trivial
|
|
40
|
+
single-tool plugin usually wants mechanical; a plugin with real ambiguity
|
|
41
|
+
in its hook, UI, or protocol-driver shape can genuinely benefit from
|
|
42
|
+
BMAD's elicitation — that's context for how to phrase the question and
|
|
43
|
+
state a recommendation ("this sounds trivial enough for mechanical
|
|
44
|
+
intake — sound right, or do you want the full BMAD pass?"), not a license
|
|
45
|
+
to skip asking it. The choice is the user's, not fixed by this core; wait
|
|
46
|
+
for their answer before starting either path.
|
|
41
47
|
|
|
42
48
|
**Mechanical path:**
|
|
43
49
|
|
|
@@ -6,9 +6,13 @@
|
|
|
6
6
|
// `pnpm dsh web --patch` launch loop, and a placeholder smoke-prompt
|
|
7
7
|
// file. It stops exactly where hand judgment starts — the `logic`
|
|
8
8
|
// layer replaces the stub body.
|
|
9
|
+
//
|
|
10
|
+
// `name` is used verbatim as the `plugins/<name>/` directory — this
|
|
11
|
+
// generator never pluralizes it.
|
|
9
12
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
10
13
|
import { dirname, join } from 'node:path';
|
|
11
14
|
import { fileURLToPath } from 'node:url';
|
|
15
|
+
import { execFileSync } from 'node:child_process';
|
|
12
16
|
|
|
13
17
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
14
18
|
const WORKSPACE_ROOT = join(HERE, '..', '..', '..');
|
|
@@ -49,6 +53,19 @@ export async function generateTool(rawName) {
|
|
|
49
53
|
await writeGenerated(join(pluginDir, 'src', 'index.ts'), fillTemplate(pluginTsTmpl, vars));
|
|
50
54
|
await writeGenerated(join(pluginDir, 'README.md'), fillTemplate(readmeTmpl, vars));
|
|
51
55
|
|
|
56
|
+
// Root README.md is a fixed index, not per-plugin narrative content —
|
|
57
|
+
// each new plugin appends one bullet after the marker, pointing at the
|
|
58
|
+
// README this generator just wrote, so a workspace with several
|
|
59
|
+
// plugins still has one place that lists them all.
|
|
60
|
+
const rootReadmePath = join(WORKSPACE_ROOT, 'README.md');
|
|
61
|
+
const rootReadme = await readFile(rootReadmePath, 'utf8');
|
|
62
|
+
const marker = '<!-- plugin-readme-links -->';
|
|
63
|
+
const bullet = `- [\`${name}\`](plugins/${name}/README.md)`;
|
|
64
|
+
if (!rootReadme.includes(bullet)) {
|
|
65
|
+
await writeFile(rootReadmePath, rootReadme.replace(marker, `${marker}\n${bullet}`), 'utf8');
|
|
66
|
+
console.log(` updated README.md`);
|
|
67
|
+
}
|
|
68
|
+
|
|
52
69
|
await writeGenerated(
|
|
53
70
|
join(pluginDir, 'tsconfig.json'),
|
|
54
71
|
JSON.stringify(
|
|
@@ -81,8 +98,18 @@ export async function generateTool(rawName) {
|
|
|
81
98
|
|
|
82
99
|
await writeGenerated(
|
|
83
100
|
join(WORKSPACE_ROOT, '.hedgehog', 'dsh-smoke', `${name}.md`),
|
|
84
|
-
`TODO: replace with a real one-line task prompt that exercises the "${name}" tool end-to-end via \`dsh --profile headless --patch plugins/${name}/cordis.
|
|
101
|
+
`TODO: replace with a real one-line task prompt that exercises the "${name}" tool end-to-end via \`dsh --profile headless --patch plugins/${name}/cordis.yml\`.\n`,
|
|
85
102
|
);
|
|
86
103
|
|
|
87
|
-
|
|
104
|
+
// The package.json just written declares real devDependencies
|
|
105
|
+
// (typescript, @deepseek-ai/cordis) nothing in the workspace has
|
|
106
|
+
// installed yet — the `logic` layer's first verify (`tsc --noEmit`)
|
|
107
|
+
// fails on a fresh plugin without this, for a reason that has nothing
|
|
108
|
+
// to do with the plugin's own code.
|
|
109
|
+
execFileSync('pnpm', ['install', '--filter', name], {
|
|
110
|
+
cwd: WORKSPACE_ROOT,
|
|
111
|
+
stdio: 'inherit',
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
console.log(`\nGenerated plugin "${name}" at plugins/${name}/. Next: fill in src/index.ts's execute().`);
|
|
88
115
|
}
|