# GPT-6 Astra · DeepSeek Harness Agent Preset [中文说明](README.md) | **English** A **DeepSeek Harness (dsh)** agent preset whose persona layer is the **GPT-6 / Codex “Astra”** prompt set. Install it and pick “GPT-6 Astra” in dsh to get an agent with the full dsh coding toolchain but the identity, tone, judgement, and autonomy of the Astra text. > In one line: **dsh's tools, Astra's persona.** **Published: ** — method A installs it in one command. --- ## Features - **The persona is selected block by block, not copied wholesale** — the source is a library of fragments for several Codex surfaces; this preset inlines only the two contiguous blocks that are actually a coding agent's instructions (see “How the persona was selected”). - **The tool surface stays complete** — the preset derives from dsh's shipped `standard` preset as a whole directory, so file read/write, search, pwsh, background jobs, Skills, plan mode, goals, subagents, workflows, and the web tools are all kept. - **One run-environment adaptation section** — `prompt/harness-bridge.md` maps the names the source uses (`functions.exec`, `apply_patch`, `update_plan`, `request_user_input`, `skills.list`, …) onto tools that exist here, and states which Codex product surfaces (Apps/Connectors, Plugins, `request_permissions`, `end_conversation`, …) do not. - **Spawned subagents do not carry the persona** — the `tool-subagent` row (provider `spawn`) installs a 444-character child persona. The `subagent_fork` row deliberately keeps the parent persona: inheriting history and reusing the parent's KV cache is its whole point. - **The excluded text travels with the preset** — `skills/gpt-6-astra-reference/` (mounted through `customSkillDirs` + `baseUrl`) carries the ~4,600 excluded lines, the selection map, and the rebuild recipe as an on-demand skill: zero resident tokens. - **The model name comes from a variable** — the persona refers to `{{model}}` instead of hardcoding a name. - **Rebuildable** — `scripts/build.mjs` regenerates the composition from `base/` + `prompt/`. - **Mount-verified** — the composition passes a real mount through `agentPresets.standingKeyFor()`: all 18 rows activate, with no process-global service leakage. --- ## Repository layout ``` . ├── package.json # also a dsh bundle plugin (dsh.bundle.patch) ├── cordis.patch.yml # bundle patch: inserts one host row ├── lib/ │ └── index.js # host row: syncs preset/ (files + skills/) into $DSH_HOME/.agent-presets/ ├── preset/ │ ├── agent.cordis.yml # ready-to-install composition (inlines the persona, ~60 KB) │ ├── preset.yml # display name and description │ └── skills/ │ └── gpt-6-astra-reference/ │ ├── SKILL.md # preset-local skill: selection map, exclusions, how to change them │ └── reference/GPT-6-Astra_Prompts.md # the source document, verbatim (339 KB) ├── base/ │ └── standard.agent.cordis.yml # upstream baseline (dsh 0.1.5-rc.3 `standard`) ├── prompt/ │ ├── GPT-6-Astra_Prompts.md # the source document (verbatim, unmodified) │ └── harness-bridge.md # appended run-environment adaptation ├── scripts/ │ ├── build.mjs # selection + row patches → preset/agent.cordis.yml │ ├── check.mjs # artifact self-check (rows, persona schema, patches, skill files) │ ├── check-plugin.mjs # bundle self-check (DSH_HOME, files + skills/, idempotency) │ ├── ci-check.sh # local CI: reproducible build + variable guard + both self-checks │ ├── install.ps1 # Windows installer (method B) │ └── install.sh # macOS / Linux installer (method B) ├── docs/ │ └── notes.md # how it works, why this selection, schema gotchas, upgrades ├── NOTICE.md # provenance and ownership of the prompt text ├── README.md # 中文说明 └── LICENSE # MIT (scripts and configuration only) ``` --- ## Install A preset's directory name is its id; dsh only reads local presets from `${DSH_HOME:-~/.dsh}/.agent-presets//`. ### Method A — through dsh (recommended: one command, self-updating) This repository is also a **dsh bundle plugin**. Once installed it syncs the composition, its metadata, and the whole `skills/` tree into the preset directory on every boot: ```bash dsh plugin --profile web add github:Zioove/gpt-6-astra-dsh-preset # then restart dsh web (bundle layers load on the next start) ``` A local checkout works too: `dsh plugin --profile web add ./gpt-6-astra-dsh-preset` - upgrade: `dsh plugin --profile web update dsh-preset-gpt-6-astra` - uninstall: `dsh plugin --profile web remove dsh-preset-gpt-6-astra` (the synced preset directory is left behind; delete `/.agent-presets/gpt-6-astra/` yourself if you want it gone) - The plugin has **zero dependencies** (Node built-ins only), is **idempotent** (per-file byte comparison), and **never takes the boot down** (failures are logged only). It treats this repository as the source of truth and overwrites same-named local edits, including inside `skills/` — but it never deletes. ### Method B — run the installer ```powershell pwsh -File scripts/install.ps1 # Windows (-Force to overwrite) ``` ```bash bash scripts/install.sh # macOS / Linux (FORCE=1 to overwrite) ``` ### Method C — copy the files by hand Copy `preset/` into `%DSH_HOME%\.agent-presets\gpt-6-astra\` (or `~/.dsh/.agent-presets/gpt-6-astra/`): ``` .agent-presets/gpt-6-astra/agent.cordis.yml .agent-presets/gpt-6-astra/preset.yml .agent-presets/gpt-6-astra/skills/… # optional: the reference skill ``` ### Zero-copy (advanced) The `dsh-agent-presets` row accepts a `roots` configuration (earlier roots win), so a clone can itself be mounted as a preset root: rearrange `preset/` into `presets/gpt-6-astra/agent.cordis.yml`, then add this to the profile's `cordis.patch.yml` or the host configuration: ```yaml - id: agent-presets config: roots: - path: ~/src/gpt-6-astra-dsh-preset/presets trust: user ``` `path` supports `~`; relative paths resolve against the process cwd. --- ## Verify and rebuild ```bash node scripts/build.mjs # selection + patches → preset/agent.cordis.yml node scripts/check.mjs # self-check: rows, persona schema, patches, skill files node scripts/check-plugin.mjs # bundle self-check: DSH_HOME resolution, install, idempotency bash scripts/ci-check.sh # all of the above plus reproducible-build and variable guards ``` `preset/agent.cordis.yml` is a **generated artifact**: after changing the selection, the bridge, or `base/`, re-run `build.mjs` and commit the result, or CI fails on `git diff --exit-code`. --- ## Usage 1. Reopen or reload the dsh Web GUI and pick **GPT-6 Astra** in the session's preset picker. 2. To make it the default for new sessions: ```yaml agent-presets: default: gpt-6-astra ``` --- ## How the persona was selected (important) The source document is titled **“Collected prompts and templates”**: a library of prompt fragments for **several Codex surfaces** (5,051 lines), not one system prompt. This preset inlines only two **contiguous** blocks that are actually a coding agent's instructions: | block | source lines | what it is | |---|---|---| | `## Base model instruction template` → just before `# Apps (Connectors)` | 5–157 | the model layer: identity, permission posture, autonomy, personality and writing style, working with the user, rules for getting work done, using skills | | `## Engine default base instruction template` → end of file | 4,775–5,051 | the engine layer: the assembled Codex CLI base instruction — how you work, AGENTS.md, responsiveness, planning, task execution, validating work, ambition vs. precision, progress updates, final answer structure, tool guidelines | The other ~4,600 lines are **deliberately excluded** because they are addressed to *other* models: `# Classification` ends with "Output that single token immediately and nothing else." (a classifier), plus the Guardian review templates, the approval and `request_permissions` fragments, the browser confirmation policies, the code-review rubric, the realtime backend, the desktop/UI fragments, and the orchestration and compaction templates. None of it is lost — it lives in `preset/skills/gpt-6-astra-reference/reference/` and loads on demand. There is also a purely technical reason: line 362 contains `{{ tenant_policy_config }}`. dsh interpolates `{{…}}` **strictly**, so an unregistered group fails the whole turn — and `dsh-persona` has no `interpolate: false` (only sections registered through `ctx.systemPrompt.section({ interpolate: false })` do). Inlining the whole file would simply not mount. To change the selection, edit `SELECTION` in `scripts/build.mjs` (start/end heading markers) and re-run build + check; a missing anchor fails the build. --- ## Deliberate deviations from `standard` `build.mjs` carries an explicit `PATCHES` list; each entry names the upstream fact it overrides and why. If an anchor is missing (or matches more than once) in a newer `standard`, the build **fails loudly** instead of silently dropping the change: | patch | why | |---|---| | `skill-filesystem` gains `customSkillDirs` (`!!js` + `baseUrl` pointing at the preset's own `skills/`) | lets the excluded text and the selection map travel with the preset and load on demand; the same mechanism the shipped `cordis` preset uses | | `tool-subagent` (spawn) gains a 444-character `persona` | the persona is resident cost; a freshly spawned child does not need the full version. `subagent_fork` is left alone — it exists to inherit history and reuse the parent's KV cache | --- ## How it works dsh assembles its system prompt from **ordered sections**; the `dsh-persona` row supplies two of them: | section | order | content in this preset | |---|---|---| | `deployment:persona-prefix` | 0 | the two Astra blocks + the run-environment adaptation | | `deployment:persona-suffix` | 10200 | `Your working directory is {{cwd}}.` | Ordering is **identity-first** (the Claude Code / Codex convention): harness identity (−100) → persona (0) → each tool row's own guidance (100–199) → the working-directory suffix (10200). dsh's tool guidance therefore comes *after* the persona and wins on conflict. The three `isolate` realm rules (`planning` / `compaction` / `delegation`) are a hard requirement dsh places on services a preset owns; they are kept exactly as upstream. --- ## Cost note The persona section is resident: roughly **44 K characters ≈ 11k tokens** on every request — about one eighth of inlining the whole 339 KB document. On top of that, a spawned subagent pays ~100 tokens of persona instead of the full text, and the reference skill costs nothing until it is loaded. --- ## Upgrade and maintenance (important) dsh changes row config schemas. Gotchas this repository has hit: - **dsh ≤ 0.1.4**: the `dsh-persona` fields were `text: `. - **Since dsh 0.1.5-rc.3**: the fields are `prefix` (required) and `suffix`; the old form **fails to mount** with `invalid config: $.prefix missing required value`. If that preset is also the default, the symptom is that **starting a new conversation fails outright and no session directory is created on disk**. After upgrading dsh, re-sync the baseline and rebuild: ```bash # 1) replace base/ with the new shipped standard cp "$DSH_INSTALL/node_modules/@deepseek-ai/dsh-agent-presets/presets/standard/agent.cordis.yml" \ base/standard.agent.cordis.yml # 2) rebuild + self-check node scripts/build.mjs node scripts/check.mjs # 3) install/update, then start one session in the GUI to confirm dsh plugin --profile web update dsh-preset-gpt-6-astra # method A # or: bash scripts/install.sh / pwsh -File scripts/install.ps1 -Force ``` Step 2 is where an upstream `standard` rewrite surfaces: the `PATCHES` anchors are checked, so a model, skill, or subagent row that upstream restructured fails the build with the patch label instead of quietly reverting to upstream behaviour. --- ## Known limitations - The Codex product surfaces the source mentions (Apps / Connectors, Plugins, Artifacts, `request_permissions`, `end_conversation`, the Guardian reviewer, the realtime backend) do not exist in dsh and are explicitly excluded by the adaptation section; for cross-session memory, use this machine's memory service (OpenViking) tools. - The source is written against OpenAI's product surface. This preset uses it only as persona and behavioural guidance; it does not change model routing and does not represent any official position of OpenAI or DeepSeek — `{{model}}` states which model is actually answering. - Any edit to the persona text changes the system-prompt prefix and therefore rebuilds the KV cache. - A spawned subagent's persona is shorter than its parent's. Delete the `persona:` line from the spawn row in `preset/agent.cordis.yml` (and rebuild) to give children the full persona again. --- ## Contributors - **Author**: [Zioove](https://github.com/Zioove) — the preset composition, the bundle plugin, the selection and run-environment adaptation, the build/check scripts, and the documentation. - **Contributor**: [T0mor1](https://github.com/T0mr1) — repository collaborator. Every commit in this repository is authored by Zioove; the repository lives under Zioove, with T0mor1 as a collaborator. --- ## License and attribution - **Scripts, configuration, and documentation** in this repository: MIT, see `LICENSE`. - **`prompt/GPT-6-Astra_Prompts.md`** (and the same text inside `preset/skills/.../reference/`) is product prompt text for OpenAI's GPT-6 / Codex surfaces, included verbatim for technical research and interoperability work only, and **not** covered by the MIT license. See `NOTICE.md`.