Merge branch 'next' into kimi-runtime-support

This commit is contained in:
Viktorplus
2026-06-08 03:57:58 +02:00
60 changed files with 4175 additions and 90 deletions

View File

@@ -0,0 +1,127 @@
# How to install a minimal GSD and add skills later
Install GSD Core with a small skill footprint to keep cold-start context low, then grow the surface — live or on reinstall — only when you need more. Use this when context budget matters: large existing projects, constrained models, or runtimes where every description token counts.
**What you need:** A supported runtime and the standard installer prerequisites (Node.js 18+ and npx). If you have not installed GSD at all yet, read [Install on your runtime](install-on-your-runtime.md) first — this guide covers the *profile* choice that layers on top of any runtime install.
---
## Install the minimal profile
To install only the core main-loop skills, add `--minimal` to the installer:
```bash
npx @opengsd/gsd-core@latest --claude --global --minimal
```
`--minimal` has two aliases — use whichever reads best to you; they are identical:
```bash
npx @opengsd/gsd-core@latest --claude --global --core-only
npx @opengsd/gsd-core@latest --claude --global --profile=core
```
A minimal install gives you the eight skills needed to run the core phase loop:
- `new-project`
- `discuss-phase`
- `plan-phase`
- `execute-phase`
- `phase`
- `help`
- `update`
- `surface`
No sub-agents are installed, and the skill-description tokens the model carries at cold start drop to roughly 130, against roughly 1,200 for a full install. The chosen profile is recorded in the `.gsd-profile` marker in your runtime config directory and is reapplied automatically every time you run `/gsd-update`, so you stay minimal across upgrades until you decide otherwise.
> Do not combine `--minimal` with `--profile=` — the installer treats that as a conflict and exits.
---
## Choose a profile
If `core` is too small, pick a wider profile instead. Pass it with `--profile=<name>`:
| Profile | What you get | Approx. description tokens |
|---------|--------------|--------------------------|
| `core` | The eight core-loop skills above. No agents. | ~130 desc tokens |
| `standard` | Everything in `core` plus common management skills — `review`, `config`, `progress`, `resume-work`, `pause-work`, `workspace` — and the sub-agents those skills need. | ~700 desc tokens |
| `full` | Every skill and every sub-agent. This is the default when you pass no profile flag. | ~1,200 desc tokens |
```bash
# Standard: the core loop plus everyday management commands
npx @opengsd/gsd-core@latest --claude --global --profile=standard
```
If you want a named profile plus one extra cluster, compose them with a comma. The installer writes the union of both:
```bash
# Core loop plus the audit/review skills, nothing else
npx @opengsd/gsd-core@latest --claude --global --profile=core,audit
```
---
## See what is installed and what is available
From inside your runtime, list the current surface, the disabled clusters, and the token cost of each:
```bash
/gsd:surface list
```
The skills are grouped into clusters you can toggle as a unit:
`core_loop`, `audit_review`, `milestone`, `research_ideate`, `workspace_state`, `docs`, `ui`, `ai_eval`, `ns_meta`, `utility`
---
## Add skills later without reinstalling
If you installed minimal and now need more, you do not have to re-run the installer. `/gsd:surface` changes the live surface and persists the change in a separate `.gsd-surface.json` file, leaving your install-time profile marker untouched.
To switch to a wider profile in place:
```bash
/gsd:surface profile standard
```
To turn on just one cluster while keeping your base profile:
```bash
/gsd:surface enable audit_review
```
To turn a cluster back off, or to discard all your live changes and return to the profile you installed:
```bash
/gsd:surface disable utility
/gsd:surface reset
```
Surface changes take effect in your next session — restart the runtime to pick them up.
---
## Add skills by reinstalling
`/gsd:surface` is the right tool for occasional, reversible adjustments. If you have decided you want the wider surface permanently, change the install-time profile instead so every future `/gsd-update` keeps it:
```bash
# Re-run the installer without --minimal to record `full` as your profile
npx @opengsd/gsd-core@latest --claude --global
# ...or pin a specific profile
npx @opengsd/gsd-core@latest --claude --global --profile=standard
```
Running `/gsd-update` re-reads the `.gsd-profile` marker and reinstalls at that profile, so a one-off reinstall at a new profile is all you need — subsequent updates follow it automatically.
---
## Related
- [Install on your runtime](install-on-your-runtime.md)
- [Update GSD](update-gsd.md)
- [Configuration](../CONFIGURATION.md)
- [Docs index](../README.md)

View File

@@ -42,6 +42,22 @@ Skills land in `~/.claude/`. Commands appear as `/gsd-*` slash commands in your
CLAUDE_CONFIG_DIR=~/.claude-alt npx @opengsd/gsd-core@latest --claude --global
```
**Hook coverage**
GSD registers the following Claude Code hook events automatically on install:
| Event | Hook | Purpose |
|---|---|---|
| `SessionStart` | `gsd-check-update.js`, `gsd-session-state.sh` | Update check, session orientation |
| `PostToolUse` | `gsd-context-monitor.js`, `gsd-read-injection-scanner.js`, `gsd-phase-boundary.sh`, `gsd-graphify-update.sh` | Context monitoring, read-time scan, phase boundary detection |
| `PreToolUse` | `gsd-prompt-guard.js`, `gsd-read-guard.js`, `gsd-workflow-guard.js`, `gsd-worktree-path-guard.js`, `gsd-validate-commit.sh` | Prompt guard, read-before-edit, workflow + worktree safety, commit validation |
| `SubagentStop` | `gsd-context-monitor.js` | Context headroom tracking after subagent completion |
| `Stop` | `gsd-context-monitor.js` | Context headroom tracking before model stop |
| `PreCompact` | `gsd-context-monitor.js` | Context awareness before conversation compaction |
| `FileChanged` (matcher: `config.json`) | `gsd-config-reload.js` | Hot-reloads `.planning/config.json` context mid-session when you edit your GSD config — no session restart required |
The `FileChanged` hook is always-on and a no-op when `.planning/config.json` does not exist in the project. Editing that file while a session is running injects an `additionalContext` summary of the new configuration so the agent picks up model overrides, workflow toggles, and hook settings immediately.
---
### Claude Code — native plugin install
@@ -107,6 +123,21 @@ The installer also enriches the generated TOML commands with two native Gemini c
GEMINI_CONFIG_DIR=~/.gemini-alt npx @opengsd/gsd-core@latest --gemini --global
```
**Hook coverage**
GSD registers the following hook events automatically on install:
| Event | Hook | Purpose |
|---|---|---|
| `SessionStart` | `gsd-check-update.js`, `gsd-session-state.sh` | Update check, session orientation |
| `BeforeTool` | `gsd-prompt-guard.js`, `gsd-read-guard.js`, `gsd-workflow-guard.js`, `gsd-worktree-path-guard.js`, `gsd-validate-commit.sh` | Prompt guard, read-before-edit, workflow + worktree safety, commit validation |
| `AfterTool` | `gsd-context-monitor.js`, `gsd-read-injection-scanner.js`, `gsd-phase-boundary.sh`, `gsd-graphify-update.sh` | Context monitoring, read-time scan, phase boundary detection |
| `BeforeAgent` | `gsd-context-monitor.js` | Context headroom awareness before the agent begins planning each prompt |
| `AfterAgent` | `gsd-context-monitor.js` | Context headroom tracking after each agent turn's final response |
| `BeforeModel` | `gsd-context-monitor.js` | Per-turn context injection before each LLM call |
> **`hooksConfig.enabled: false` warning.** If your Gemini `settings.json` contains `hooksConfig.enabled: false`, the Gemini CLI silently disables all hook execution — GSD hooks are registered but will never run. The installer detects this and emits a warning. To enable hooks, set `hooksConfig.enabled: true` in `~/.gemini/settings.json` (or the directory matching your `GEMINI_CONFIG_DIR`).
---
### Gemini CLI — native extension install (#775)

View File

@@ -35,14 +35,34 @@ Restart your runtime after the update to pick up new commands and agents.
|------|--------------|
| `--sync` | After updating, sync skills from the GSD registry |
| `--reapply` | After updating, merge locally modified GSD files back in from `gsd-local-patches/` |
| `--next` / `--rc` | Target the `@next` RC dist-tag instead of `@latest` (installs or refreshes a release candidate; see ADR #660) |
```bash
/gsd-update --sync # Update and sync skills
/gsd-update --reapply # Update and reapply local patches
/gsd-update --next # Install from the @next RC dist-tag
```
---
## Install or refresh a release candidate
GSD publishes release candidates on the `@next` npm dist-tag (established by ADR #660). To install or refresh from that channel:
```bash
/gsd-update --next
# or equivalently:
/gsd-update --rc
```
The full update flow applies — scope/runtime detection, changelog preview, custom-file backup, and cache clearing all run normally. The only difference is that `check-latest-version.cjs` resolves the `@next` tag and npx installs from `@opengsd/gsd-core@next`.
Only `latest` and `next` are supported channels; no arbitrary dist-tag can be passed (the script enforces an allowlist and exits with code 2 on an invalid tag).
Omitting `--next`/`--rc` keeps targeting `@latest` (stable channel, no change in behavior).
---
## Reviewing the changelog before updating
`/gsd-update` always shows the changelog diff between your installed version and the latest *before* it asks for confirmation. You do not need to visit GitHub separately. The output looks like: