docs(dsh): живая проверка guard, require-plan и bootstrap

This commit is contained in:
Andrey Epifancev 2026-10-24 15:42:00 +04:00
parent 7665218247
commit a6bddfc197
2 changed files with 30 additions and 9 deletions

View File

@ -36,8 +36,13 @@
- [x] `dsh/install.sh`, `mcp.codegraph.yml`, README/PORT.
- [x] `bash dsh/tests/run.sh` — 25 тестов зелёные.
- [x] `bash tests/run.sh` — 630 тестов зелёные (регрессий нет).
- [ ] Живая проверка в DSH: маркер, guard на main, `/role`, acceptance
superpowers.
- [x] Живой `guard-main`: `write` и `bash` на main → `BLOCKED`.
- [x] Живой `require-plan`: `src/probe.ts` без `.bounded` → `BLOCKED`;
с `.bounded` → разрешено.
- [x] Bootstrap: marker `6b676dd9bb8a0234` пришёл в контекст сессии.
- [ ] `/role dev` — проверить в UI.
- [ ] Acceptance superpowers в чистой сессии.
- [ ] `/compact` → повторный bootstrap.
- [ ] Решение по SDD (async controller vs workflow).
## Acceptance

View File

@ -1,6 +1,7 @@
# DSH port — design and spike notes
Status: **spike 0.1.0, live verification pending**. This directory is the
Status: **spike 0.1.0, live guard/require-plan/bootstrap verified; `/role` and
fresh-session acceptance pending**. This directory is the
DeepSeek Harness adapter for `claude-harness`; the Claude Code installation and
the repository's source of truth are unchanged.
@ -200,6 +201,20 @@ Live checks:
`<!-- DSH-HARNESS-BOOTSTRAP:<hash> -->`; after compaction a new marker is
appended.
Verified live on 2026-10-24 in the desktop profile:
- the bootstrap marker `<!-- DSH-HARNESS-BOOTSTRAP:6b676dd9bb8a0234 -->` and the
full `using-superpowers` body arrived in a fresh session, and the skill
catalog showed the superpowers skills;
- `write` to a file on `main` returned `BLOCKED [guard-main]`;
- a Bash redirect write on `main` returned `BLOCKED [guard-main]`;
- a `write` on a feature branch was allowed;
- `write` to `src/probe.ts` on the branch returned `BLOCKED [require-plan]`,
and the same write succeeded after creating `.bounded`.
Still pending: `/role dev`, the fresh-session "react todo list" acceptance, and
re-injection after `/compact`.
Automated tests:
```bash
@ -235,11 +250,11 @@ profile was removed; the real `desktop` profile was not touched.
cwd resolution async, the adapter needs a `tools/pre-execute` fallback. The
guard is global and monotonic; it runs after `tools/pre-execute`, so an earlier
user approval cannot turn a `guard-main` denial back into permission.
- **`agent/pre-step` injection.** The code follows the shipped skill-catalog
pattern (`next()` then append `messages`), but the live behavior of
`createUserMessage({source:{kind:"user"}})` in a host bundle still needs a
smoke test. The source kind is intentionally `user` to avoid an unknown
session source variant.
- **`agent/pre-step` injection.** Verified live: the bootstrap marker and body
arrived in a fresh session, and the skill catalog showed the superpowers
skills. The local `createUserMessage` copy works with `source.kind: "user"`,
which avoids an unknown session source variant. Re-injection after compaction
is still pending.
- **Subagent bootstrap.** `isSubagent` probes common fields; if none are present
on this version, the bootstrap reaches children too. The skill's
`<SUBAGENT-STOP>` makes that harmless but token-expensive.
@ -254,7 +269,8 @@ profile was removed; the real `desktop` profile was not touched.
## 8. Next phases
1. Live smoke test in DSH: guard, bootstrap marker, `/role`.
1. Finish the live smoke test: `/role dev`, the fresh-session superpowers
acceptance, and bootstrap re-injection after `/compact`.
2. Add `harness-check` and optional `role-hint` as non-blocking pre-step
injections.
3. Build `briefing` as an agent preset (read-only tools + model route).