@dsmm/dsmm 0.0.0-stage → 0.1.0
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/LICENSE +103 -0
- package/README.md +67 -2
- package/agent-presets/dsmm-builder/agent.cordis.yml +210 -0
- package/agent-presets/dsmm-builder/preset.yml +3 -0
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +34 -0
- package/agent-presets/dsmm-clarifier/preset.yml +3 -0
- package/agent-presets/dsmm-code-search/agent.cordis.yml +34 -0
- package/agent-presets/dsmm-code-search/preset.yml +3 -0
- package/agent-presets/dsmm-creative/agent.cordis.yml +31 -0
- package/agent-presets/dsmm-creative/preset.yml +3 -0
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +34 -0
- package/agent-presets/dsmm-doc-search/preset.yml +3 -0
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +34 -0
- package/agent-presets/dsmm-media-reader/preset.yml +3 -0
- package/agent-presets/dsmm-oracle/agent.cordis.yml +31 -0
- package/agent-presets/dsmm-oracle/preset.yml +3 -0
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +31 -0
- package/agent-presets/dsmm-oracle-2nd/preset.yml +3 -0
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +215 -0
- package/agent-presets/dsmm-orchestrator/preset.yml +3 -0
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +33 -0
- package/agent-presets/dsmm-plan-critic/preset.yml +3 -0
- package/agent-presets/dsmm-planner/agent.cordis.yml +33 -0
- package/agent-presets/dsmm-planner/preset.yml +3 -0
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +33 -0
- package/agent-presets/dsmm-reviewer/preset.yml +3 -0
- package/cordis.patch.yml +8 -0
- package/docs/agent-presets.md +17 -0
- package/docs/compatibility.md +46 -0
- package/docs/design.md +237 -0
- package/docs/lsp.md +40 -0
- package/docs/migration-from-ocmm.md +48 -0
- package/docs/model-routing.md +16 -0
- package/docs/releasing.md +50 -0
- package/docs/research/deepseek-v4-pro.md +74 -0
- package/docs/research/oh-dsh.md +96 -0
- package/docs/roadmap.md +207 -0
- package/docs/runtime-recovery.md +67 -0
- package/docs/safety-guards.md +55 -0
- package/docs/settings-status.md +51 -0
- package/docs/skill-sync.md +20 -0
- package/lib/commands.d.ts +13 -0
- package/lib/commands.js +55 -0
- package/lib/dsh-events.d.ts +13 -0
- package/lib/dsh-events.js +2 -0
- package/lib/dsh-types.d.ts +308 -0
- package/lib/dsh-types.js +2 -0
- package/lib/guards.d.ts +10 -0
- package/lib/guards.js +252 -0
- package/lib/index.d.ts +31 -0
- package/lib/index.js +54 -0
- package/lib/lsp.d.ts +30 -0
- package/lib/lsp.js +154 -0
- package/lib/mode.d.ts +6 -0
- package/lib/mode.js +62 -0
- package/lib/model-family.d.ts +6 -0
- package/lib/model-family.js +49 -0
- package/lib/model-routing.d.ts +11 -0
- package/lib/model-routing.js +103 -0
- package/lib/plan-validation.d.ts +3 -0
- package/lib/plan-validation.js +119 -0
- package/lib/preset-materializer.d.ts +36 -0
- package/lib/preset-materializer.js +258 -0
- package/lib/preset-registry.d.ts +5 -0
- package/lib/preset-registry.js +126 -0
- package/lib/preset-skills.d.ts +12 -0
- package/lib/preset-skills.js +28 -0
- package/lib/prompts.d.ts +13 -0
- package/lib/prompts.js +82 -0
- package/lib/recovery-policy.d.ts +25 -0
- package/lib/recovery-policy.js +252 -0
- package/lib/role-subagents.d.ts +6 -0
- package/lib/role-subagents.js +54 -0
- package/lib/roles.d.ts +28 -0
- package/lib/roles.js +239 -0
- package/lib/runtime-recovery.d.ts +5 -0
- package/lib/runtime-recovery.js +149 -0
- package/lib/session-scope.d.ts +4 -0
- package/lib/session-scope.js +17 -0
- package/lib/settings.d.ts +112 -0
- package/lib/settings.js +363 -0
- package/lib/shell-command.d.ts +18 -0
- package/lib/shell-command.js +492 -0
- package/lib/skills.d.ts +18 -0
- package/lib/skills.js +64 -0
- package/lib/state.d.ts +13 -0
- package/lib/state.js +64 -0
- package/lib/status.d.ts +46 -0
- package/lib/status.js +155 -0
- package/package.json +124 -4
- package/patches/agent-presets-root.example.cordis.patch.yml +14 -0
- package/patches/ocmm-lsp-mcp.example.cordis.patch.yml +15 -0
- package/prompts/deepseek-flash.md +11 -0
- package/prompts/deepseek-v4-pro.md +14 -0
- package/prompts/deepwork.md +32 -0
- package/skills/brainstorming/SKILL.md +15 -0
- package/skills/debugging/SKILL.md +12 -0
- package/skills/debugging/references/logging.md +91 -0
- package/skills/debugging/references/methodology/00-setup.md +108 -0
- package/skills/debugging/references/methodology/02-investigate.md +67 -0
- package/skills/debugging/references/methodology/03-flaky-triage.md +69 -0
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +83 -0
- package/skills/debugging/references/methodology/05-escalate.md +69 -0
- package/skills/debugging/references/methodology/06-fix.md +123 -0
- package/skills/debugging/references/methodology/08-qa.md +94 -0
- package/skills/debugging/references/methodology/09-cleanup.md +164 -0
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +217 -0
- package/skills/debugging/references/runtimes/bundled-js-binary.md +415 -0
- package/skills/debugging/references/runtimes/go.md +252 -0
- package/skills/debugging/references/runtimes/native-binary.md +484 -0
- package/skills/debugging/references/runtimes/node.md +260 -0
- package/skills/debugging/references/runtimes/python.md +248 -0
- package/skills/debugging/references/runtimes/rust.md +234 -0
- package/skills/debugging/references/scripts/dap.mjs +533 -0
- package/skills/debugging/references/tools/dap.md +89 -0
- package/skills/debugging/references/tools/ghidra.md +212 -0
- package/skills/debugging/references/tools/playwright-cli.md +316 -0
- package/skills/debugging/references/tools/pwndbg.md +263 -0
- package/skills/debugging/references/tools/pwntools.md +265 -0
- package/skills/dispatching-parallel-agents/SKILL.md +14 -0
- package/skills/receiving-code-review/SKILL.md +13 -0
- package/skills/remove-ai-slops/SKILL.md +14 -0
- package/skills/requesting-code-review/SKILL.md +10 -0
- package/skills/subagent-driven-development/SKILL.md +13 -0
- package/skills/writing-plans/SKILL.md +14 -0
package/lib/status.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { DshAgent } from "./dsh-types.js";
|
|
2
|
+
import type { DsmmModelFamily } from "./model-family.js";
|
|
3
|
+
import type { DeepseekCalibration, DsmmSettings } from "./settings.js";
|
|
4
|
+
export declare const DSMM_STATUS_VERSION: 1;
|
|
5
|
+
export interface DsmmStatusSnapshot {
|
|
6
|
+
version: typeof DSMM_STATUS_VERSION;
|
|
7
|
+
mode: {
|
|
8
|
+
name: string;
|
|
9
|
+
active: boolean;
|
|
10
|
+
selectedPreset?: string;
|
|
11
|
+
dsmmPreset: boolean;
|
|
12
|
+
inScope: boolean;
|
|
13
|
+
};
|
|
14
|
+
route: {
|
|
15
|
+
provider?: string;
|
|
16
|
+
model?: string;
|
|
17
|
+
family: DsmmModelFamily;
|
|
18
|
+
deepseekV4Pro: boolean;
|
|
19
|
+
deepseekFlash: boolean;
|
|
20
|
+
currentReasoningEffort?: string;
|
|
21
|
+
};
|
|
22
|
+
calibration: {
|
|
23
|
+
mode: DeepseekCalibration;
|
|
24
|
+
applies: boolean;
|
|
25
|
+
policyEffort?: "off" | "low" | "high" | "max";
|
|
26
|
+
action: "disabled" | "out-of-scope" | "non-target-route" | "preserve-explicit" | "fill-missing" | "enforce";
|
|
27
|
+
};
|
|
28
|
+
runtimeRecovery: {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
applies: boolean;
|
|
31
|
+
fallbackRouteCount: number;
|
|
32
|
+
maxFallbackAttempts: number;
|
|
33
|
+
idleContinuation: {
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
maxContinuations: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
effectiveSettings: DsmmSettings;
|
|
39
|
+
}
|
|
40
|
+
export declare function createDsmmStatusSnapshot(input: {
|
|
41
|
+
agent: DshAgent;
|
|
42
|
+
settings: DsmmSettings;
|
|
43
|
+
modeActive: boolean;
|
|
44
|
+
}): DsmmStatusSnapshot;
|
|
45
|
+
export declare function formatDsmmStatus(snapshot: DsmmStatusSnapshot): string;
|
|
46
|
+
//# sourceMappingURL=status.d.ts.map
|
package/lib/status.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { classifyModelFamily } from "./model-family.js";
|
|
2
|
+
import { isDeepseekFlashRoute, isDeepseekV4ProRoute } from "./model-routing.js";
|
|
3
|
+
import { isDsmmRoleId } from "./roles.js";
|
|
4
|
+
import { resolveSelectedAgentPreset } from "./session-scope.js";
|
|
5
|
+
export const DSMM_STATUS_VERSION = 1;
|
|
6
|
+
export function createDsmmStatusSnapshot(input) {
|
|
7
|
+
const { agent, settings, modeActive } = input;
|
|
8
|
+
const selectedPreset = resolveSelectedAgentPreset(agent.session);
|
|
9
|
+
const dsmmPreset = isDsmmRoleId(selectedPreset);
|
|
10
|
+
const inScope = modeActive || dsmmPreset;
|
|
11
|
+
const selectedRoute = resolveRoute(agent);
|
|
12
|
+
const family = classifyModelFamily({
|
|
13
|
+
providerID: selectedRoute.provider,
|
|
14
|
+
modelID: selectedRoute.model
|
|
15
|
+
});
|
|
16
|
+
const deepseekV4Pro = selectedRoute.provider !== undefined
|
|
17
|
+
&& selectedRoute.model !== undefined
|
|
18
|
+
&& isDeepseekV4ProRoute({ provider: selectedRoute.provider, model: selectedRoute.model });
|
|
19
|
+
const deepseekFlash = selectedRoute.provider !== undefined && selectedRoute.model !== undefined
|
|
20
|
+
&& isDeepseekFlashRoute({ provider: selectedRoute.provider, model: selectedRoute.model });
|
|
21
|
+
return {
|
|
22
|
+
version: DSMM_STATUS_VERSION,
|
|
23
|
+
mode: {
|
|
24
|
+
name: settings.modeName,
|
|
25
|
+
active: modeActive,
|
|
26
|
+
...(selectedPreset === undefined ? {} : { selectedPreset }),
|
|
27
|
+
dsmmPreset,
|
|
28
|
+
inScope
|
|
29
|
+
},
|
|
30
|
+
route: {
|
|
31
|
+
...(selectedRoute.provider === undefined ? {} : { provider: selectedRoute.provider }),
|
|
32
|
+
...(selectedRoute.model === undefined ? {} : { model: selectedRoute.model }),
|
|
33
|
+
family,
|
|
34
|
+
deepseekV4Pro,
|
|
35
|
+
deepseekFlash,
|
|
36
|
+
...(selectedRoute.reasoningEffort === undefined ? {} : { currentReasoningEffort: selectedRoute.reasoningEffort })
|
|
37
|
+
},
|
|
38
|
+
calibration: resolveCalibration({
|
|
39
|
+
calibration: deepseekFlash ? settings.deepseekFlashCalibration : settings.deepseekV4ProCalibration,
|
|
40
|
+
inScope,
|
|
41
|
+
targetRoute: deepseekV4Pro || deepseekFlash,
|
|
42
|
+
policyEffort: resolvePolicyEffort(settings, selectedPreset, deepseekFlash),
|
|
43
|
+
currentReasoningEffort: selectedRoute.reasoningEffort
|
|
44
|
+
}),
|
|
45
|
+
runtimeRecovery: {
|
|
46
|
+
enabled: settings.runtimeRecovery.enabled,
|
|
47
|
+
applies: settings.runtimeRecovery.enabled && inScope,
|
|
48
|
+
fallbackRouteCount: settings.runtimeRecovery.fallbackRoutes.length,
|
|
49
|
+
maxFallbackAttempts: settings.runtimeRecovery.maxFallbackAttempts,
|
|
50
|
+
idleContinuation: {
|
|
51
|
+
enabled: settings.runtimeRecovery.idleContinuation.enabled,
|
|
52
|
+
maxContinuations: settings.runtimeRecovery.idleContinuation.maxContinuations
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
effectiveSettings: copySettings(settings)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function formatDsmmStatus(snapshot) {
|
|
59
|
+
const scope = snapshot.mode.dsmmPreset && snapshot.mode.selectedPreset
|
|
60
|
+
? `${snapshot.mode.selectedPreset} preset`
|
|
61
|
+
: snapshot.mode.inScope
|
|
62
|
+
? "active deepwork"
|
|
63
|
+
: "out of scope";
|
|
64
|
+
const provider = snapshot.route.provider ?? "unavailable";
|
|
65
|
+
const model = snapshot.route.model ?? "unavailable";
|
|
66
|
+
const policyEffort = snapshot.calibration.policyEffort ?? "not applicable";
|
|
67
|
+
const currentReasoningEffort = snapshot.route.currentReasoningEffort ?? "provider default";
|
|
68
|
+
return [
|
|
69
|
+
"DSMM status",
|
|
70
|
+
`Mode: ${snapshot.mode.active ? "active" : "inactive"} (${snapshot.mode.name})`,
|
|
71
|
+
`Scope: ${scope}`,
|
|
72
|
+
`Workflow policy: ${snapshot.effectiveSettings.workflow.policy}`,
|
|
73
|
+
`Route: ${provider}/${model} [${snapshot.route.family}]`,
|
|
74
|
+
`Reasoning: ${snapshot.calibration.mode}; policy=${policyEffort}; current=${currentReasoningEffort}; action=${snapshot.calibration.action}`,
|
|
75
|
+
`Runtime recovery: ${snapshot.runtimeRecovery.enabled ? "enabled" : "disabled"}; applies=${snapshot.runtimeRecovery.applies ? "yes" : "no"}; fallbacks=${snapshot.runtimeRecovery.fallbackRouteCount}; max attempts=${snapshot.runtimeRecovery.maxFallbackAttempts}`,
|
|
76
|
+
`Idle continuation: ${snapshot.runtimeRecovery.idleContinuation.enabled ? "enabled" : "disabled"}; max=${snapshot.runtimeRecovery.idleContinuation.maxContinuations}`,
|
|
77
|
+
"Effective settings: use /dsmm-status json for the normalized snapshot"
|
|
78
|
+
].join("\n");
|
|
79
|
+
}
|
|
80
|
+
function resolveRoute(agent) {
|
|
81
|
+
const requestHeader = agent.session.requestHeader?.();
|
|
82
|
+
if (requestHeader !== undefined) {
|
|
83
|
+
const config = requestHeader?.config;
|
|
84
|
+
return {
|
|
85
|
+
provider: readString(config?.provider),
|
|
86
|
+
model: readString(config?.model),
|
|
87
|
+
reasoningEffort: readString(config?.reasoningEffort)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
provider: readString(agent.options?.provider),
|
|
92
|
+
model: readString(agent.options?.model)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function readString(value) {
|
|
96
|
+
return typeof value === "string" ? value : undefined;
|
|
97
|
+
}
|
|
98
|
+
function resolvePolicyEffort(settings, selectedPreset, flash) {
|
|
99
|
+
const presets = flash ? settings.deepseekFlashMaxReasoningPresets : settings.deepseekV4ProMaxReasoningPresets;
|
|
100
|
+
return isDsmmRoleId(selectedPreset) && presets.includes(selectedPreset)
|
|
101
|
+
? "max"
|
|
102
|
+
: flash ? settings.deepseekFlashDefaultReasoningEffort : settings.deepseekV4ProDefaultReasoningEffort;
|
|
103
|
+
}
|
|
104
|
+
function resolveCalibration(input) {
|
|
105
|
+
if (input.calibration === "off") {
|
|
106
|
+
return { mode: input.calibration, applies: false, action: "disabled" };
|
|
107
|
+
}
|
|
108
|
+
if (!input.inScope) {
|
|
109
|
+
return { mode: input.calibration, applies: false, action: "out-of-scope" };
|
|
110
|
+
}
|
|
111
|
+
if (!input.targetRoute) {
|
|
112
|
+
return { mode: input.calibration, applies: false, action: "non-target-route" };
|
|
113
|
+
}
|
|
114
|
+
if (input.calibration === "auto") {
|
|
115
|
+
return input.currentReasoningEffort === undefined
|
|
116
|
+
? { mode: input.calibration, applies: true, policyEffort: input.policyEffort, action: "fill-missing" }
|
|
117
|
+
: { mode: input.calibration, applies: true, policyEffort: input.policyEffort, action: "preserve-explicit" };
|
|
118
|
+
}
|
|
119
|
+
return { mode: input.calibration, applies: true, policyEffort: input.policyEffort, action: "enforce" };
|
|
120
|
+
}
|
|
121
|
+
function copySettings(settings) {
|
|
122
|
+
return {
|
|
123
|
+
modeName: settings.modeName,
|
|
124
|
+
defaultActive: settings.defaultActive,
|
|
125
|
+
promptOrder: settings.promptOrder,
|
|
126
|
+
deepseekV4ProCalibration: settings.deepseekV4ProCalibration,
|
|
127
|
+
deepseekV4ProDefaultReasoningEffort: settings.deepseekV4ProDefaultReasoningEffort,
|
|
128
|
+
deepseekV4ProMaxReasoningPresets: [...settings.deepseekV4ProMaxReasoningPresets],
|
|
129
|
+
deepseekFlashCalibration: settings.deepseekFlashCalibration,
|
|
130
|
+
deepseekFlashDefaultReasoningEffort: settings.deepseekFlashDefaultReasoningEffort,
|
|
131
|
+
deepseekFlashMaxReasoningPresets: [...settings.deepseekFlashMaxReasoningPresets],
|
|
132
|
+
skills: { ...settings.skills },
|
|
133
|
+
roles: { ...settings.roles },
|
|
134
|
+
presets: { ...settings.presets },
|
|
135
|
+
workflow: { ...settings.workflow },
|
|
136
|
+
guards: {
|
|
137
|
+
...settings.guards,
|
|
138
|
+
toolOutputTruncation: { ...settings.guards.toolOutputTruncation },
|
|
139
|
+
questionLabelHelper: { ...settings.guards.questionLabelHelper }
|
|
140
|
+
},
|
|
141
|
+
runtimeRecovery: {
|
|
142
|
+
...settings.runtimeRecovery,
|
|
143
|
+
retryOnStatusCodes: [...settings.runtimeRecovery.retryOnStatusCodes],
|
|
144
|
+
retryOnCodes: [...settings.runtimeRecovery.retryOnCodes],
|
|
145
|
+
fallbackRoutes: settings.runtimeRecovery.fallbackRoutes.map((route) => ({ ...route })),
|
|
146
|
+
idleContinuation: { ...settings.runtimeRecovery.idleContinuation }
|
|
147
|
+
},
|
|
148
|
+
lsp: {
|
|
149
|
+
...settings.lsp,
|
|
150
|
+
args: [...settings.lsp.args],
|
|
151
|
+
env: { ...settings.lsp.env }
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=status.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,126 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsmm/dsmm",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DeepSeek Harness deepwork mode bundle for ocmm-style agentic workflows.",
|
|
5
|
+
"author": "Hugefiver",
|
|
6
|
+
"license": "LicenseRef-AAAPL",
|
|
7
|
+
"repository": "https://github.com/hugefiver/ocmm",
|
|
8
|
+
"homepage": "https://github.com/hugefiver/ocmm/tree/master/dsmm",
|
|
9
|
+
"bugs": "https://github.com/hugefiver/ocmm/issues",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"deepseek-harness",
|
|
12
|
+
"dsh",
|
|
13
|
+
"dsh-plugin",
|
|
14
|
+
"deepwork",
|
|
15
|
+
"agentic-workflows",
|
|
16
|
+
"cordis"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"registry": "https://registry.npmjs.org/",
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./lib/index.js",
|
|
24
|
+
"types": "./lib/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./lib/index.d.ts",
|
|
28
|
+
"default": "./lib/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./preset-skills": {
|
|
31
|
+
"types": "./lib/preset-skills.d.ts",
|
|
32
|
+
"default": "./lib/preset-skills.js"
|
|
33
|
+
},
|
|
34
|
+
"./package.json": "./package.json"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"lib/**/*.js",
|
|
38
|
+
"lib/**/*.d.ts",
|
|
39
|
+
"agent-presets",
|
|
40
|
+
"docs/agent-presets.md",
|
|
41
|
+
"docs/compatibility.md",
|
|
42
|
+
"docs/design.md",
|
|
43
|
+
"docs/lsp.md",
|
|
44
|
+
"docs/migration-from-ocmm.md",
|
|
45
|
+
"docs/model-routing.md",
|
|
46
|
+
"docs/releasing.md",
|
|
47
|
+
"docs/research",
|
|
48
|
+
"docs/roadmap.md",
|
|
49
|
+
"docs/runtime-recovery.md",
|
|
50
|
+
"docs/safety-guards.md",
|
|
51
|
+
"docs/settings-status.md",
|
|
52
|
+
"docs/skill-sync.md",
|
|
53
|
+
"patches",
|
|
54
|
+
"prompts",
|
|
55
|
+
"skills",
|
|
56
|
+
"cordis.patch.yml",
|
|
57
|
+
"LICENSE",
|
|
58
|
+
"README.md"
|
|
59
|
+
],
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "tsc -p tsconfig.json",
|
|
62
|
+
"check:release": "node scripts/check-release-readiness.mjs",
|
|
63
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
64
|
+
"typecheck:test": "pnpm run build && tsc -p tsconfig.test.json --noEmit",
|
|
65
|
+
"test": "pnpm run build && node --test --experimental-strip-types test/*.test.ts",
|
|
66
|
+
"smoke:docker:build": "docker build --build-arg DSH_PACKAGE=@deepseek-ai/dsh@0.2.0-rc.2 -f docker/Dockerfile.smoke -t dsmm-dsh-smoke:0.2 ..",
|
|
67
|
+
"smoke:docker:run": "docker run --rm dsmm-dsh-smoke:0.2",
|
|
68
|
+
"smoke:docker": "node scripts/docker-smoke.mjs"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=22"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@deepseek-ai/schemastery": "~3.18.4"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
78
|
+
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
|
|
79
|
+
"@deepseek-ai/dsh-brand": "0.2.0-rc.2",
|
|
80
|
+
"@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
|
|
81
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.0-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-tool-bash": "0.2.0-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-tool-pwsh": "0.2.0-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-tool-skill": "0.2.0-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-persona": "0.2.0-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.0-rc.2"
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
97
|
+
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-brand": "0.2.0-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-scope": "0.2.0-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.0-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-tool-bash": "0.2.0-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-tool-pwsh": "0.2.0-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-tool-skill": "0.2.0-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-persona": "0.2.0-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.0-rc.2",
|
|
118
|
+
"@types/node": "^26.0.0",
|
|
119
|
+
"typescript": "^6.0.3"
|
|
120
|
+
},
|
|
121
|
+
"dsh": {
|
|
122
|
+
"bundle": {
|
|
123
|
+
"patch": "./cordis.patch.yml"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Example only: dsmm does not auto-apply this patch.
|
|
2
|
+
#
|
|
3
|
+
# Use this from an explicit dsh profile/patch after enabling dsmm preset
|
|
4
|
+
# materialization with a matching `presets.root` value in the dsmm config.
|
|
5
|
+
# Patching `agent-presets` replaces the whole row, so restate default, roots,
|
|
6
|
+
# and includeUserRoot instead of only adding the dsmm root.
|
|
7
|
+
- id: agent-presets
|
|
8
|
+
config:
|
|
9
|
+
default: standard
|
|
10
|
+
roots:
|
|
11
|
+
# Replace this with the same absolute path configured as dsmm.presets.root.
|
|
12
|
+
- path: /absolute/path/to/dsmm-managed-agent-presets
|
|
13
|
+
trust: user
|
|
14
|
+
includeUserRoot: true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Example only: opt-in dsmm LSP MCP bridge.
|
|
2
|
+
# Requires ocmm-lsp to be on PATH or command to be replaced with an absolute wrapper path.
|
|
3
|
+
- insert:
|
|
4
|
+
- id: dsmm-lsp-mcp
|
|
5
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
6
|
+
config:
|
|
7
|
+
transport: stdio
|
|
8
|
+
serverName: dsmm_lsp
|
|
9
|
+
command: ocmm-lsp
|
|
10
|
+
args:
|
|
11
|
+
- mcp
|
|
12
|
+
env: {}
|
|
13
|
+
cwd: ""
|
|
14
|
+
toolCallTimeoutMs: 60000
|
|
15
|
+
failOnStartupError: true
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<dsmm-deepseek-flash-calibration>
|
|
2
|
+
|
|
3
|
+
DeepSeek-V41-Flash applies only to the verified deepseek-official/deepseek-flash or deepseek-account/deepseek-flash routes. The host catalog and explicit user model choice are authoritative.
|
|
4
|
+
|
|
5
|
+
- Keep work outcome-first and avoid procedural review or approval loops.
|
|
6
|
+
- Runtime reasoning effort is chosen by the adapter only from the resolved model's advertised efforts. If the catalog advertises no reasoning efforts, leave the request unchanged.
|
|
7
|
+
- Auto preserves explicit upstream effort; strict overrides it only with an advertised effort.
|
|
8
|
+
- Do not assume max, high, temperature, or another model's capabilities. Do not claim model heterogeneity when all child roles use the same route.
|
|
9
|
+
- Maintain tool-call continuity required by the provider and never reveal private reasoning.
|
|
10
|
+
|
|
11
|
+
</dsmm-deepseek-flash-calibration>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<dsmm-deepseek-v4-pro-calibration>
|
|
2
|
+
|
|
3
|
+
DeepSeek V4 Pro calibration is active.
|
|
4
|
+
|
|
5
|
+
- Treat complex coding, architecture, migration, debugging, and review tasks as deliberate reasoning tasks.
|
|
6
|
+
- First classify the task and identify the evidence needed.
|
|
7
|
+
- Use tools before making repository-specific or API-specific claims.
|
|
8
|
+
- Runtime reasoning effort is enforced by `agent/request`, not this prompt.
|
|
9
|
+
- In `auto` calibration, explicit upstream reasoning effort is preserved; `strict` overrides it with computed policy.
|
|
10
|
+
- Only adapter-advertised reasoning efforts are emitted; `max` is selected only for configured DSMM presets.
|
|
11
|
+
- Keep final answers concise and do not expose private chain-of-thought.
|
|
12
|
+
- When tool calls are enabled through the provider, preserve the provider-required reasoning/tool-call continuity.
|
|
13
|
+
|
|
14
|
+
</dsmm-deepseek-v4-pro-calibration>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<dsmm-deepwork-mode>
|
|
2
|
+
|
|
3
|
+
DEEPWORK MODE ENABLED!
|
|
4
|
+
|
|
5
|
+
Use this workflow only while the `{{modeName}}` mode is active OR a DSMM-managed preset is selected. This is an opt-in boundary: outside both conditions, do not apply dsmm-specific gates, intent routing, or tool-discipline requirements. The default mode name is `deepwork` unless configured.
|
|
6
|
+
|
|
7
|
+
## Intent routing
|
|
8
|
+
|
|
9
|
+
Determine whether the user requests an explanation, diagnosis, implementation, or open-ended design. State the outcome and evidence in the user's language; classify aloud only when it helps the user.
|
|
10
|
+
|
|
11
|
+
## Workflow gates
|
|
12
|
+
|
|
13
|
+
- A clear implementation request authorizes its stated scope. Do not require design reapproval or a separate approval loop for equivalent implementation decisions.
|
|
14
|
+
- For complex business or behavior implementation, default to planner → plan-critic → implementation. Skip this sequence only for a bounded, simple, low-risk change or an explicit permitted user request. A task having multiple steps alone is not the criterion.
|
|
15
|
+
- Escalate choices that change scope or acceptance, weaken safety/data guarantees, change a public API/protocol or permissions, or cause an irreversible effect. Preserve explicit user configuration.
|
|
16
|
+
- Request implementation review when risk, uncertainty, or user requirements warrant it; reviewer is primary-lane self-review, while an Oracle is an externally configured cross-check. Do not run fixed review loops or manufacture an Oracle model.
|
|
17
|
+
- For completed implementation, gather evidence from tests, diagnostics, and real surfaces before declaring done.
|
|
18
|
+
- Keep scope exact. Do not add unrelated refactors, speculative abstractions, or surprise features.
|
|
19
|
+
- The bundled workflow skill set is available in this mode: `brainstorming`, `writing-plans`, `subagent-driven-development`, `dispatching-parallel-agents`, `requesting-code-review`, `receiving-code-review`, and `remove-ai-slops`.
|
|
20
|
+
- `workflow.policy=risk-based` uses the rules above. Explicit `workflow.policy=legacy` retains the configured `strictGates`, `reviewCap`, and `finalReviewPolicy` gates. Do not apply any DSMM policy outside active `{{modeName}}` mode or DSMM-managed preset scope.
|
|
21
|
+
|
|
22
|
+
## Tool discipline
|
|
23
|
+
|
|
24
|
+
Use repository tools for repository-specific claims. Prefer narrow reads and searches before broad exploration. Use external documentation for library, API, CLI, or cloud-service details.
|
|
25
|
+
|
|
26
|
+
- Use the shell dialect available in the current DSH runtime. Keep commands short and inspectable; resolve exact paths before destructive actions and do not string-build cross-shell deletes.
|
|
27
|
+
- No autonomous Git writes: implementing or fixing does not authorize a commit, and a commit does not authorize pushing, tagging, rebasing, or releasing.
|
|
28
|
+
- Child tasks inherit the host's authority and depth limits. Delegate only through actually available DSH tools; preset files alone do not prove that a role is callable.
|
|
29
|
+
|
|
30
|
+
- DSMM safety guards may enforce shell dialect, git-write approval, output-size, plan-format, question-label, and todo-discipline policy inside this mode; treat `[dsmm safety]` messages as binding policy feedback.
|
|
31
|
+
|
|
32
|
+
</dsmm-deepwork-mode>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: Use before creative or materially ambiguous work to clarify outcomes, constraints, risks, and an implementation direction.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming
|
|
7
|
+
|
|
8
|
+
Discover only enough to resolve decisions that materially change the approved outcome.
|
|
9
|
+
|
|
10
|
+
- A clear imperative authorizes implementation of its stated scope; no separate design reapproval is needed for an equivalent choice.
|
|
11
|
+
- Inspect current behavior, interfaces and safety boundaries. Use a bounded direct path for clear work, a spike when feasibility is unknown, and an architectural decision when material trade-offs remain.
|
|
12
|
+
- Record consequential assumptions, why evidence supports them and the cost if wrong. Ask the smallest useful question only for a user-owned decision or meaningful scope/rework risk.
|
|
13
|
+
- Escalate choices changing public APIs/protocols, permissions, data/security guarantees, acceptance or irreversible effects; do not infer authorization for unrelated work.
|
|
14
|
+
- For complex behavior implementation, use planner → plan-critic → implementation even when the goal is clear. Skip only a limited simple low-risk change or an explicit permitted user request.
|
|
15
|
+
- Communicate a design at the granularity needed for coordination; neither a fixed design artifact nor a repeated approval loop is automatic.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugging
|
|
3
|
+
description: Use on demand for real runtime failures, flaky tests and DAP-assisted investigation; this is not one of the seven automatically injected core workflow skills.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debugging
|
|
7
|
+
|
|
8
|
+
Investigate the observed runtime behavior in the actual DSH environment. Form several plausible hypotheses, collect distinguishing evidence, and capture a failing case before applying a minimal fix. Verify that same case afterward and exercise the real affected surface. Clean up only task-owned artifacts after inspecting exact targets.
|
|
9
|
+
|
|
10
|
+
Read the relevant runtime and methodology guides in `references/` as needed. For a DAP-capable debugger, read `references/tools/dap.md` and use the bundled zero-dependency `references/scripts/dap.mjs` through a currently available shell tool; do not invent a DSH debugger API or install an adapter without authorization. Keep debugger target directories and credentials isolated. The DAP client does not grant permissions beyond the current DSH sandbox, shell and user approval policy.
|
|
11
|
+
|
|
12
|
+
The coordinator chooses any genuinely useful independent investigation through currently callable role-specific DSH tools. Do not assume OpenCode/Codex tool names, session errors or retry ownership. Never stage, commit, push, tag, rebase or release as an incidental debugging step.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Logging — Cross-Language Methodology
|
|
2
|
+
|
|
3
|
+
Every log line has exactly two legitimate readers: the operator reconstructing an incident and the developer reproducing a bug. A line that serves neither is cost — storage, noise, and attention stolen from the lines that matter. Everything below derives from that.
|
|
4
|
+
|
|
5
|
+
This reference is deliberately stack-agnostic. It never tells you which logging library to use — the project's existing practice decides (Rule 0).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Rule 0 — Discover the project's practice before emitting anything
|
|
10
|
+
|
|
11
|
+
**BEFORE adding a single log line, find out how this project logs.** Grep for the logger initialization, a wrapper module, prior art in sibling files, and the project's agent docs (AGENTS.md / CLAUDE.md).
|
|
12
|
+
|
|
13
|
+
| What you find | Required behavior |
|
|
14
|
+
|---|---|
|
|
15
|
+
| A designated logger or wrapper | Use it exactly — its levels, its field conventions, its error-passing shape. Copy the call shape of the nearest well-written call site, not your habit. |
|
|
16
|
+
| A logging lib you like better | Irrelevant. NEVER introduce a second logging framework into a project that already has one. |
|
|
17
|
+
| Raw `console.*` / `print` culture | Follow it for user-facing CLI output. For diagnostics, propose structured logging in your reply — do not unilaterally convert the project. |
|
|
18
|
+
| **No logging at all** (library, small CLI, script) | **Respect the absence.** A library that suddenly logs is a behavior change its consumers never asked for; a 40-line script does not need a logging framework. If logging would genuinely help, say so in your reply — add it only when the user asks or the task itself is about observability. |
|
|
19
|
+
|
|
20
|
+
Bypassing the project's designated logger with a bare `console.log` / `print` "just for this one line" is the logging equivalent of `as any`: it escapes every contract the project set up — stage routing, formatting, redaction, shipping.
|
|
21
|
+
|
|
22
|
+
Serialization contracts (reserved field names, argument order, the key an Error must be passed under) are project knowledge. Discover the contract from the logger config and existing call sites; if the project's agent docs do not record it, record what you found there as part of your change.
|
|
23
|
+
|
|
24
|
+
## Greenfield — when you own the setup
|
|
25
|
+
|
|
26
|
+
A new service earns exactly this much logging infrastructure, and no more:
|
|
27
|
+
|
|
28
|
+
1. **One init module.** Callers import a ready logger; only the init module knows the stage. No call site ever checks `NODE_ENV`-style vars to decide how to log.
|
|
29
|
+
2. **Stage split by environment.** Dev = human-readable (pretty, colorized). Prod = structured, machine-parseable (JSON to stdout). Same logger API on both — the stage changes the sink and format, never the call sites.
|
|
30
|
+
3. **Level threshold per stage.** Dev = `debug`, prod = `info`, overridable with a `LOG_LEVEL`-style env var.
|
|
31
|
+
4. **The stack's standard structured logger** — never a hand-rolled one.
|
|
32
|
+
5. **Error-serialization proof.** Before trusting error logging, pass a real Error/exception through the PROD formatter once and assert the output preserves type, message, and stack. Every structured-logging stack has a reserved-key contract, and violating it typically produces an empty `{}` where the stack trace should have been — discovered during the incident. This is a one-line test; write it at setup time and the whole bug class is dead permanently.
|
|
33
|
+
|
|
34
|
+
## Choosing the level — consumer, not severity
|
|
35
|
+
|
|
36
|
+
**A level is a routing decision, not a severity vibe. Choose it by naming who consumes the line and what they do about it. If you cannot name the consumer, do not emit the line.**
|
|
37
|
+
|
|
38
|
+
| Level | Consumer and action | The line earns this level when |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `error` | Alerting wakes a human NOW | **The service failed** at a user-visible operation and cannot recover on its own. |
|
|
41
|
+
| `warn` | Reviewed in batch — dashboards, weekly triage | The request SUCCEEDED but took an abnormal path: retry needed, fallback engaged, degraded mode, suspicious data. |
|
|
42
|
+
| `info` | Read during an incident to reconstruct the timeline | A state transition without which the request's story does not reconstruct: session/job/connection created, completed, destroyed. |
|
|
43
|
+
| `debug` | The developer reproducing locally | Detailed tracing. **Does not exist in prod.** |
|
|
44
|
+
|
|
45
|
+
Two corollaries that get violated constantly:
|
|
46
|
+
|
|
47
|
+
- **`error` means the SERVICE failed, not the request.** A 4xx is the client's mistake handled correctly — that is `warn` at most, `info` for routine misses. Reserve `error` for 5xx-class outcomes: the service could not do its job. Log 4xx as `error` and the alert channel drowns in noise from every crawler probing `/wp-admin`; a drowned alert channel is equivalent to no alerting.
|
|
48
|
+
- **A failure logged at `info` is invisible.** If the message says "failed", the level is `warn` or `error` — never `info`.
|
|
49
|
+
|
|
50
|
+
## Placement — log decisions, not work
|
|
51
|
+
|
|
52
|
+
Log where the system decides something, not where it does something:
|
|
53
|
+
|
|
54
|
+
- **Boundaries** — request in / response out, calls to external systems (and their failures).
|
|
55
|
+
- **State transitions** — create / complete / destroy of sessions, jobs, connections.
|
|
56
|
+
- **Decision points** — retry chosen, fallback engaged, cache bypassed, degraded mode entered.
|
|
57
|
+
- **The one place an error is finally handled.**
|
|
58
|
+
|
|
59
|
+
Never log inside pure functions, utilities, or private helpers — callers with context log outcomes; internals stay silent. Two mechanical rules:
|
|
60
|
+
|
|
61
|
+
- **One event, one line.** Log-and-rethrow at every layer turns one incident into five look-alike incidents. Log where the error is handled; layers that only propagate stay silent.
|
|
62
|
+
- **Mechanical logging belongs to middleware.** Request/response logging is wired once at the framework layer, never hand-assembled per handler. High-volume zero-signal paths (health probes, metrics scrapes) are excluded there as data — an exclusion set — not as scattered `if` statements.
|
|
63
|
+
|
|
64
|
+
**No speculative logs.** "Might need it later" is not a consumer. A log line earns its place through evidence: a debugging session that burned rounds because this state was invisible (see the debugging bridge below), an incident postmortem, an alert that needs the field.
|
|
65
|
+
|
|
66
|
+
## The line contract
|
|
67
|
+
|
|
68
|
+
- **The message is a stable, grep-able constant; data goes in fields.** `logger.warn({orderId, attempt}, "payment retry")` — never `` `retrying payment for ${orderId}` ``. An interpolated message cannot be counted, aggregated, or alerted on.
|
|
69
|
+
- **Correlation or it did not happen.** Request-scoped lines carry the trace/request id; entity-scoped lines carry the entity id. A line you cannot join to its request is noise during the only moments logs matter.
|
|
70
|
+
- **Name events semantically** (`session.destroy`, `payment.fallback`), never positionally ("Step 3"). Step numbers couple the log stream to today's call structure; the first refactor makes them lie.
|
|
71
|
+
- **No secrets.** Tokens, credentials, session cookies, and PII never enter a log line; URLs are sanitized (strip or redact query params like `token`, `key`) before logging. A leaked log is a leaked credential.
|
|
72
|
+
- **The logging path may not break the program.** If a log call can itself fail (serializing exotic state, a wrapper that touches I/O), that failure is caught, downgraded to a `warn` through a channel that cannot fail, and the operation continues. An empty catch around logging is still an empty catch.
|
|
73
|
+
|
|
74
|
+
## Anti-patterns
|
|
75
|
+
|
|
76
|
+
| Anti-pattern | Why it fails |
|
|
77
|
+
|---|---|
|
|
78
|
+
| `console.*` / `print` bypassing the project's designated logger | Escapes stage routing, redaction, and shipping — invisible in prod |
|
|
79
|
+
| Introducing a logging framework to a project that has none | Uninvited behavior change; Rule 0 violation |
|
|
80
|
+
| 4xx logged as `error` | Alert noise buries real pages |
|
|
81
|
+
| Log-and-rethrow at every layer | One incident looks like five |
|
|
82
|
+
| Variables interpolated into the message string | Un-aggregatable, un-alertable |
|
|
83
|
+
| "Might need it later" logs | No consumer → pure cost |
|
|
84
|
+
| Debug-time prints promoted to permanent `info` | Narration, not state transitions |
|
|
85
|
+
| Trusting Error serialization without the proof | `error: {}` in prod, discovered during the incident |
|
|
86
|
+
|
|
87
|
+
## Debugging bridge — how logs earn their place
|
|
88
|
+
|
|
89
|
+
When a `debugging`-skill session takes extra rounds *because state was invisible* — no line told you which branch ran, what the value was, whether the fallback engaged — that invisibility is a defect adjacent to the bug. **The fix ships with the log line that would have made diagnosis one round**: placed at a decision point, leveled by consumer, fields not interpolation, through the project's designated logger.
|
|
90
|
+
|
|
91
|
+
The inverse also holds: every temporary `print` / `dbg!` / `console.log` planted *during* diagnosis is a debug artifact and gets scrubbed at cleanup. The triage between the two is the consumer test — a line whose ongoing consumer you can name is part of the fix; a line that only served today's session is an artifact.
|