dsh-j-space
Automatic J-Space cognition suite for DeepSeek Harness — one dsh-plugin install, structured reasoning in every agent session.
English | 简体中文
dsh-j-space is a DeepSeek Harness (dsh) plugin that turns the J-Space Cognition Suite V3.6 into default behavior for every agent: a working-set discipline, checkpoints and recovery for long tasks, and verify-before-ship completion. Install the bundle, restart the profile, and work normally—there is no activation command to remember.
This is an inference-time control layer, not a fine-tune. It changes no model weights, does not inspect or rewrite hidden reasoning, and does not replace the Harness agent loop.
TL;DR
- What it is. A DeepSeek Harness plugin that makes the J-Space Cognition Suite V3.6 the default operating discipline for every agent: a bounded working set, checkpoints that survive compaction, and verification before anything is called done.
- Install.
dsh plugin --profile web add github:wxxb789/dsh-j-space#main, then restart the profile — full steps. - Use. Nothing to learn: no flag, no command, no prompt prefix. Work as usual;
/j-spacestays available as a manual re-entry — details. - Cost. One instruction payload per active model context. No new tool, no schema change, no system-prompt takeover, no runtime dependency, no network call — how it works.
- Not. Not a fine-tune, not a benchmark-score guarantee, and not a replacement for the Harness agent loop.
Highlights
- Zero-config activation. One
dsh plugin add, and every agent—including spawned, forked, and hot-reloaded ones—starts each step with J-Space in context. - Exactly one copy, always present. Activation is deduplicated against the derived model context and the messages pending in the same step, and it is restored automatically after compaction.
- No tool-catalog footprint. No registered tool, no JSON schema, no
system-prompt/assembletakeover. The/j-spaceskill stays human-invocable and hidden from the model-invocable catalog. - PTC / Code Mode native. Works with DSH's
run_codeagent preset by composition instead of copying it; DSH keeps ownership of tools, presentation, and the code runtime. - Byte-level upstream fidelity. Nine modules and three references are pinned by SHA-256 to a specific upstream commit and enforced in CI.
- Zero runtime dependencies. Committed ESM built with Vite, a guarded ~2.5 KB plugin entry, no install script, and no network calls.
- Optional durable ledger. A small Node.js controller keeps
Goal / Core / Verified / Open / Nextstate forloopwork, writing only.jspace/inside the task workspace.
Contents
- Install
- Usage
- Operating model
- Optional local controller
- Configuration
- Upgrade · Uninstall
- How it works
- PTC / Code Mode inheritance
- Fidelity contract
- Reproducing the reported evaluation
- Interaction with other cognition plugins
- Compatibility and development
- FAQ
- Related projects
- Community and support
- Sources and license
Install
Prerequisites: Node.js 22.19+ or 24+, pnpm on PATH, a working dsh installation, and a profile such as web or headless.
# 1. Add the plugin bundle. Replace web with the profile you use.
dsh plugin --profile web add github:wxxb789/dsh-j-space#main
# 2. Confirm that the bundle layer and the dsh-j-space row are present.
dsh --profile web --dump-config
# 3. Restart DeepSeek Harness, then open a new session.
dsh --profile web
For a reproducible installation, replace main with a release tag or exact commit SHA:
dsh plugin --profile web add github:wxxb789/dsh-j-space#<tag-or-commit>
The package ships committed ESM built with Vite. Consumers run no build step, install script, or third-party runtime dependency.
Installation is per profile: repeat the command for every profile that should get J-Space. See Upgrade to move to a newer version and Uninstall to remove it.
Usage
Everyday work
There is nothing to invoke. Once the profile is restarted, every session starts each step with J-Space already in context, so describe the task exactly as you did before.
What changes is how the agent works, not how you talk to it:
- it keeps a small explicit working set instead of carrying every detail forward;
- it maintains
Goal / Core / Verified / Open / Nexton long tasks and refreshes it at seams; - it treats “done” as a claim that needs a check, and reports which check it ran.
Verify that it is active
dsh --profile web --dump-config
The dump should show the bundle layer and a dsh-j-space row with autoActivate: true. Behaviorally, a fresh session started after the restart is the reliable place to look: the first step already reflects the J-Space frame.
Re-enter deliberately
/j-space
Type it in the session input when you want an explicit reset — after a long detour, after compaction, or when taking over someone else's session. The skill is human-invocable only: the model cannot call it, and it adds no catalog entry and no tool schema. If the same step already carries automatic activation, the manual invocation wins and no second copy is appended.
Match the pass to the task
You do not choose the pass; the agent selects the lightest one it can still check, using the operating model table. You can still say so directly — “keep this fast”, “treat this as loop work” — when you know more about the task than its first turn shows.
Long-running work
For loop work the agent may keep a durable ledger under .jspace/ in the task workspace through the optional local controller. Add .jspace/ to the repository ignore rules if you do not want it tracked; deleting the directory removes only J-Space working state.
PTC / Code Mode
Select the PTC agent preset when starting the session. Activation is identical to Standard mode, and DSH keeps ownership of run_code, the generated tools.* SDK, and tool execution policy. See PTC / Code Mode inheritance.
Turn automatic activation off
To keep the skill installed but require an explicit /j-space, set autoActivate: false as shown under Configuration, then restart the profile.
Operating model
The suite chooses the lightest pass that can still be checked:
| Pass | Use it for | Runtime behavior |
|---|---|---|
fast |
One-step work checkable at a glance | No module or controller |
full |
A short, multi-step deliverable | Load only the relevant one or two modules; check before delivery |
loop |
Multi-file, multi-stage, multi-turn, or tool-heavy work | Maintain Goal / Core / Verified / Open / Next, refresh at seams, and verify before delivery |
The suite limits the live working set, broadcasts shared constraints, binds monitoring signals to actions, switches stalled derivation to measurement, keeps dense notation out of task-facing output, and treats completion as a claim requiring verification.
“J-Space” is an operational frame. It does not establish phenomenal consciousness, expose hidden activations, or guarantee that every model implements an identical internal mechanism.
Optional local controller
For loop work, the bundled controller provides a small durable state surface. It uses the Node.js runtime already required by DeepSeek Harness, makes no network calls, refuses symlinked state files, and writes only .jspace/ under the task workspace.
node <skill-root>/../dist/jspace.js note --goal "what done means" --next "first action"
node <skill-root>/../dist/jspace.js seam
node <skill-root>/../dist/jspace.js note --check "what now holds" --by "tests over all affected files"
node <skill-root>/../dist/jspace.js ship path/to/draft.md
node <skill-root>/../dist/jspace.js resume
DSH supplies the absolute <skill-root> in the skill resource hint, so the agent resolves this path automatically. Humans normally do not need to run these commands.
The controller deliberately is not a DSH tool. It uses the existing shell surface, avoiding any change to the model's tool catalog. Every behavior also has a hand-executable equivalent in the suite.
Add .jspace/ to the task repository's ignore rules if needed. Deleting it removes only J-Space working state, not project files or Harness session history.
Configuration
Automatic activation is enabled by the bundle:
- insert:
- id: dsh-j-space
name: dsh-j-space
config:
autoActivate: true
To keep the skill installed but require manual /j-space activation, override the row in the profile's cordis.patch.yml:
- id: dsh-j-space
config:
autoActivate: false
Restart the profile after changing configuration.
Upgrade
dsh plugin --profile web update dsh-j-space
To move to a specific release or commit:
dsh plugin --profile web add github:wxxb789/dsh-j-space#<new-tag-or-commit>
Restart DSH after upgrading. An existing active context retains the version already recorded, avoiding a silent mid-trajectory rule change. Start a new session for the new version, invoke /j-space explicitly, or allow a later context rebuild to restore the installed version.
Uninstall
dsh plugin --profile web remove dsh-j-space
Restart the profile. Uninstalling stops future activation but does not rewrite old session logs or delete workspace .jspace/ state.
How it works
Under the hood, dsh-j-space is one lifecycle listener plus one skill registration. This section covers what runs on every step, which activation guarantees follow from it, and which DeepSeek Harness surfaces are deliberately left untouched.
Activation flow
flowchart TD
A["Task enters agent/pre-step"] --> B["Run downstream pre-step policies"]
B --> C{"J-Space active in model context?"}
C -- "yes" --> E["Continue normal DSH loop"]
C -- "no" --> D["Append canonical J-Space instructions"]
D --> E
The plugin registers the complete suite as a human-invocable /j-space skill. Its global agent/pre-step listener calls the rest of the waterfall first, then appends the same canonical <skill_content> payload used by an explicit DSH skill invocation. The task input therefore precedes the J-Space body, matching the research's task-conditioned activation shape more closely than session-start injection.
Activation guarantees
Activation is durable but deduplicated against both the current derived model context and messages already pending in the same step:
- The first active model request receives J-Space automatically.
- Normal turns do not accumulate duplicate copies.
- Existing and hot-reloaded agents activate on their next step.
- Spawned agents activate independently; forked agents reuse inherited activation while it remains in context.
- If compaction removes the activation from derived model context, the next step restores it.
- An explicit
/j-spacein the same step wins; automatic activation does not add a second copy.
/j-space remains available as a deliberate re-entry gesture. It is human-invocable but hidden from the model-invocable skill catalog, so the plugin adds no model-visible catalog entry and no tool schema.
What it changes, and what it leaves alone
The upstream capability-realization report argues that first-turn interface shape, tool definitions, context retention, and verification policy can change DeepSeek's realized behavior. This plugin therefore changes only the instruction and optional working-state layers:
| Boundary | Design |
|---|---|
| Model adapter and sampling | Unchanged |
| System prompt | Unchanged |
| Tool schemas and presentation | Owned by the active DSH preset; unmodified here |
| Assistant reasoning blocks | Preserved by DSH; never parsed here |
| Tool-call/result adjacency | Preserved by DSH; never intercepted here |
| Activation | One source-labelled instruction in each active model context |
| Ongoing state | Optional workspace ledger for loop work |
| Modules | Loaded selectively from the installed skill directory |
The implementation is intentionally small: strict TypeScript at authoring time, a 2.5 KB generated plugin entry at runtime, and no DSH runtime package bundled or required by the published artifact. DSH public types constrain the provider, lifecycle listener, decisions, messages, branded identifiers, and configuration boundary.
PTC / Code Mode inheritance
J-Space works with DSH's built-in PTC mode without another plugin option. Select the PTC agent preset when starting a session; default J-Space activation then applies exactly as it does in Standard mode.
This is native composition, not a copy of PTC:
- DSH remains the sole owner of
tool-presentation,run_code, the generated TypeScripttools.*SDK, the code runtime, and tool execution policy. dsh-j-spaceinjects onlyagentsandskills. It does not register a tool, replacesystem-prompt/assemble, accesscodeRuntime, or select a tool presentation.- PTC therefore retains all Standard-mode capabilities through its generated SDK, while Standard and custom presets retain their own native/code/both choice.
- Calls made from a
run_codeprogram re-enter DSH's normal typed tool pipeline, including validation, approval, guards, scheduling, result finalization, and observation. J-Space does not create a bypass. - The optional J-Space controller uses the existing
bashcapability. In PTC it is naturally available as the generatedtools.bash(...)binding; the plugin does not add a duplicate controller tool or schema.
The shipped Web and headless bundles compose DSH's TypeScript worker runtime. A custom deployment must also compose a Code Mode runtime; if it does not, DSH rejects the PTC preset at mount instead of silently degrading. The plugin intentionally preserves that fail-fast boundary.
Installing this plugin enables J-Space by default. It does not force every session into PTC; the selected agent preset remains authoritative.
PTC compatibility is an operational feature, not a benchmark-equivalence claim. PTC changes the tool interface relative to the report's Minimal composition; use the controlled procedure under Reproducing the reported evaluation when measuring research fidelity.
Fidelity contract
The fidelity baseline is J-Space Cognition Suite V3.6 commit 885dc51. The repository enforces the following:
| Surface | Enforced property |
|---|---|
| Nine modules and three references | SHA-256 byte identity with the pinned upstream commit |
| Entry skill | Exact upstream bytes after restoring frontmatter and the Python-to-Node controller path adaptation |
| Ledger template | Exact upstream bytes after restoring the documented controller-path adaptation |
| Model-facing wrapper | Equal to DSH renderSkillContent() for the pinned Harness release |
| Activation order | Task/pending input first, J-Space instructions after it |
| Activation cardinality | One copy in active derived context, including manual-invocation deduplication |
| PTC inheritance | No tool, presentation, prompt-assembly, or code-runtime ownership; the selected DSH preset remains authoritative |
| Controller | Golden lifecycle, checkpoint, recovery, encoding, refusal, symlink, register, and stall tests |
| Runtime footprint | No runtime dependencies, no inlined skill body, and a guarded small entry bundle |
The only model-visible suite adaptation is the optional controller command: Python becomes the Node.js artifact shipped by this plugin. DSH filesystem-provider frontmatter is represented as typed provider metadata rather than being repeated in the instruction body. Automatic activation itself lives outside the suite content.
These checks protect protocol and prompt fidelity. They do not prove benchmark-score replication.
Reproducing the reported evaluation
The DeepSeek V4 J-Space Capability Realization Report records a stricter experiment than “install this plugin in any profile”:
- DeepSeek Harness Minimal composition;
- the reported V4-Flash-0731 or V4-Pro-0813 model;
reasoning_effort = max,temperature = 1.0, andtop_p = 0.95;- identical task input, benchmark implementation, tools, model, and scoring between control and treatment;
- J-Space actively loaded by the user, with no unrelated skill directory injected;
- one reported run per J-Space result, without confidence intervals.
To reproduce rather than merely use the plugin:
- Freeze the DSH, plugin, model, benchmark, and task revisions.
- Recreate the Minimal tool and prompt composition; do not use an ordinary
webprofile as an assumed equivalent. - Run clean-session A/B trials with
autoActivate: falseversustrue, keeping every other condition fixed. - Record that this plugin automates the user's load gesture. The tested model-facing wrapper and ordering are equivalent, but the durable source metadata and human action are not literally identical experimental events.
- Run multiple seeds or repetitions and publish raw outcomes, mean/effect size, uncertainty, failures, token/tool cost, and verification coverage. Record whether the service actually honored
temperatureandtop_pin thinking mode.
The upstream tables are useful engineering evidence, but their J-Space values are single-run observations and cross-vendor columns retain vendor-specific methods. This project therefore does not claim that installation alone reproduces a particular score or universally makes one model equal to another.
Interaction with other cognition plugins
Do not blindly stack persona, anchor, routing, and cognition injectors. For a controlled composition:
- give one component ownership of first-turn persona/anchor text;
- let routing choose one behavior band;
- let J-Space own the live working set, checkpoints, recovery, and verification;
- compare with the same model, task, tools, sampling settings, and harness.
Compatibility and development
The implementation targets DeepSeek Harness 0.1.0-rc.7 at commit 99f6f02. DSH is in developer preview; revalidate this contract across breaking Harness releases.
corepack enable
pnpm install --frozen-lockfile
pnpm typecheck
pnpm test
pnpm pack --dry-run
The source uses TypeScript 6, Vite 8, Vitest 4, pnpm 11, strict null/index checks, exact optional properties, isolated modules, and declaration emit. CI runs Node.js 22.19 and 24, rebuilds committed dist/, and rejects generated drift.
FAQ
Does this fine-tune or modify the model?
No. dsh-j-space is an inference-time control layer. It appends one instruction payload to the model context and changes no weights, no sampling parameters, and no system prompt.
Do I have to type /j-space in every session?
No. That is the point of the plugin: activation is automatic and durable. /j-space remains available as a deliberate re-entry gesture.
Does it work with PTC / Code Mode (run_code)?
Yes. Select the PTC agent preset; J-Space activation applies exactly as in Standard mode. See PTC / Code Mode inheritance.
Does it add tools or change my tool schemas? No. The plugin registers no tool and no schema. The optional controller runs through the existing shell capability, so the model-visible catalog is unchanged.
Does it send data anywhere?
No. There are no network calls and no runtime dependencies. The optional controller writes only .jspace/ under the task workspace and refuses symlinked state files.
How do I keep the skill but disable automatic activation?
Set autoActivate: false for the dsh-j-space row in your profile's cordis.patch.yml and restart the profile. See Configuration.
Does installing it reproduce the reported benchmark numbers? No, and this project does not claim it does. The upstream figures are single-run observations under a stricter setup; see Reproducing the reported evaluation.
Which DeepSeek Harness versions are supported?
The contract targets DSH 0.1.0-rc.7. DSH is in developer preview, so revalidate across breaking Harness releases.
Can I use it with non-DeepSeek models? The plugin is model-agnostic at the DSH boundary—it only appends instructions—but the reported behavior evidence is DeepSeek-specific. Treat other models as untested.
How do I remove the working state?
Delete .jspace/ in the task workspace. That removes only J-Space working state, not project files or Harness session history.
Related projects
- DeepSeek Harness — the open-source
dshagent harness this plugin extends. - J-Space Cognition Suite V3.6 — the upstream cognition suite reproduced here byte for byte.
- DeepSeek V4 J-Space Capability Realization Report — the evaluation this plugin's design responds to.
- Cordis — the plugin runtime behind DSH's "everything is a plugin" architecture.
- More DSH plugins — the official
dsh-plugintopic.
Community and support
- Report bugs and request features in Issues; ask usage questions in Discussions.
- Read CONTRIBUTING.md before opening a pull request, and report vulnerabilities privately as described in SECURITY.md.
- For Harness-level questions, use DeepSeek Harness Discussions.
- Building your own plugin? Tag it with the official
dsh-plugintopic so others can find it. - If this plugin is useful in your workflow, starring the repository helps other Harness users discover it.
Sources and license
This implementation cites:
- J-Space Cognition Suite V3.6, DOI 10.5281/zenodo.21971181.
- DeepSeek V4 J-Space Capability Realization Report, DOI 10.5281/zenodo.21971185.
The report is cited, not redistributed. Files under skill/ are adapted from the Apache-2.0-licensed suite. See LICENSE, NOTICE, and CITATION.cff.
No comments yet. Be the first to write one.