설치
npx -y @deepseek-ai/dsh plugin --profile web add github:862930522/opencode-anchored-standard이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.
README
유지 관리자가 작성한 문서 스냅샷입니다.
opencode-anchored-standard
An opencode plugin that runs a two-phase tool catalog: bootstrap each session with a minimal tool surface, then unlock the full toolset after the session's first tool call.
Inspired by xiaobright/dsh-anchored-standard,
the two-phase preset for DeepSeek Harness. This is an independent implementation
for opencode — no DeepSeek Harness code is included.
Why
Models with strong tool catalogs can over-rely on them on the very first turn, picking an elaborate tool before understanding the task. A bootstrap phase forces a cheap, minimal start (shell + read) and only hands over the full catalog once the model has actually started working. The phase is derived from durable session state, so resume, reload and compaction all preserve it — no plugin-side storage is needed.
How it works
Per session:
- While the session has no durable tool call in its history, the plugin:
- injects a short bootstrap rule into the system prompt (only
bashandreadare usable right now); - rejects calls to any other tool with a model-visible error that explains the unlock condition.
- injects a short bootstrap rule into the system prompt (only
- The first call of any bootstrap tool — successful or failed — promotes the session.
- From then on every tool is allowed, and the bootstrap rule disappears from the system prompt (so the prompt changes exactly once, like the original).
Promotion state is cached in memory per session and re-derived from message history on demand, so a fresh plugin instance (restart) picks up the correct phase automatically.
Platform note: opencode currently has no API to filter the tool catalog per request (the
toolsarray sent to the model is assembled by the core and not hookable). The anchored approach here keeps the full catalog listed for request-cache stability, and enforces the bootstrap phase through the system prompt plus execution interception. Behavior is equivalent for a rule-following model; the original DeepSeek Harness preset instead hides the tools from the catalog entirely.
Install
Add the plugin to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-anchored-standard"]
}
Restart opencode and start a new session. The plugin has no network access and adds no telemetry.
Options
{
"plugin": [["opencode-anchored-standard", { "bootstrapTools": ["bash", "read"] }]]
}
| Option | Type | Default | Description |
|---|---|---|---|
bootstrapTools | string[] | ["bash", "read"] | Tools available during the bootstrap phase. |
Verify
Check a session's requests:
- the first request's system prompt contains the
Bootstrap phasesection; - calling any non-bootstrap tool before the first bootstrap tool call fails with a "locked" error;
- after the first
bash/readcall theBootstrap phasesection is gone and every tool works.
Development
npm install
npm run check # typecheck + build + tests
Tests run against the compiled output with plain node --test, no opencode
instance required.
License
MIT. The mechanism is inspired by
xiaobright/dsh-anchored-standard
(MIT); see NOTICE.
프로젝트 파일 및 신호
표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.
저장소 정보
- 언어
- JavaScript
- 라이선스
- MIT
- 마지막 업데이트
- 2026. 8. 14. 오후 5:08
신중하게 설치하기
소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.