@mthanh/vespercli 1.5.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -88
- package/assets/CATALOG.md +19 -1
- package/assets/claude/agents/feature-wrap-document.md +138 -13
- package/assets/claude/agents/history-logger.md +22 -0
- package/assets/claude/agents/workspace-learner.md +45 -12
- package/assets/claude/commands/compact-knowledge.md +1 -1
- package/assets/claude/commands/revalidate-knowledge.md +17 -0
- package/assets/claude/context.md.tpl +38 -14
- package/assets/claude/skills/agent-fundamentals/SKILL.md +15 -0
- package/assets/claude/skills/agent-fundamentals/references/codebase-query.md +4 -0
- package/assets/claude/skills/gitlab-guardrails/SKILL.md +62 -0
- package/assets/claude/skills/vesper-catalog-editing-safety/SKILL.md +141 -0
- package/assets/claude/vesper-orchestrator.md +10 -0
- package/assets/core/agents/feature-wrap-document.agent.md +37 -11
- package/assets/core/agents/history-logger.agent.md +22 -0
- package/assets/core/agents/vesper.agent.md +5 -0
- package/assets/core/agents/workspace-learner.agent.md +43 -12
- package/assets/core/prompts/compact-knowledge.prompt.md +1 -1
- package/assets/core/prompts/revalidate-knowledge.prompt.md +19 -0
- package/assets/core/skills/agent-fundamentals/SKILL.md +15 -0
- package/assets/core/skills/agent-fundamentals/references/codebase-query.md +4 -0
- package/assets/hooks/pre-commit +17 -1
- package/assets/manifest.json +37 -0
- package/assets/skills/aesthetic/manifest.json +1 -1
- package/assets/skills/ai-multimodal/manifest.json +1 -1
- package/assets/skills/backend-development/manifest.json +1 -1
- package/assets/skills/better-auth/manifest.json +1 -1
- package/assets/skills/chrome-devtools/manifest.json +1 -1
- package/assets/skills/code-review/manifest.json +1 -1
- package/assets/skills/databases/manifest.json +1 -1
- package/assets/skills/debugging/manifest.json +1 -1
- package/assets/skills/devops/manifest.json +1 -1
- package/assets/skills/docs-seeker/manifest.json +1 -1
- package/assets/skills/document-skills/manifest.json +1 -1
- package/assets/skills/frontend-design/manifest.json +1 -1
- package/assets/skills/gitlab-guardrails/SKILL.md +62 -0
- package/assets/skills/gitlab-guardrails/manifest.json +8 -0
- package/assets/skills/google-adk-python/manifest.json +1 -1
- package/assets/skills/mcp-builder/manifest.json +1 -1
- package/assets/skills/mermaidjs-v11/manifest.json +1 -1
- package/assets/skills/premium-frontend-ui/manifest.json +6 -4
- package/assets/skills/problem-solving/manifest.json +1 -1
- package/assets/skills/react-mui-tanstack/manifest.json +16 -16
- package/assets/skills/sequential-thinking/manifest.json +1 -1
- package/assets/skills/skill-creator/manifest.json +1 -1
- package/assets/skills/tailwind-shadcn/manifest.json +102 -102
- package/assets/skills/vercel-react-best-practices/manifest.json +2 -2
- package/assets/skills/vesper-catalog-editing-safety/SKILL.md +141 -0
- package/assets/skills/vesper-catalog-editing-safety/manifest.json +8 -0
- package/assets/skills/vscode-agent-config/manifest.json +8 -0
- package/assets/skills/web-design-guidelines/manifest.json +1 -1
- package/assets/skills/web-frameworks/manifest.json +1 -1
- package/dist/cli.min.js +25 -25
- package/package.json +5 -2
- package/src/mcp/vesper-indexing/dist/constants.d.ts.map +1 -1
- package/src/mcp/vesper-indexing/dist/constants.js +3 -0
- package/src/mcp/vesper-indexing/dist/constants.js.map +1 -1
- package/src/mcp/vesper-indexing/package-lock.json +2 -2
- package/src/mcp/vesper-indexing/package.json +1 -1
|
@@ -37,6 +37,19 @@ You must STRICTLY follow this format for every entry:
|
|
|
37
37
|
|
|
38
38
|
When asked to log something (e.g., "Log that Phase 1 started"), generate the formatted string and **append** it to the end of the file.
|
|
39
39
|
|
|
40
|
+
### 4. Recent-Decisions Ring Buffer (Implementation completions only)
|
|
41
|
+
|
|
42
|
+
After every **Implementation pipeline completion** (orchestrator Step 11), in parallel with your normal `history.md` append, also record one bounded line in `.claude/vesper/context/recent-decisions.md`. This is a **self-healing trim-to-N ring buffer** (N=10) — the newest 10 decisions live in the on-demand context tier; everything older rolls into the history archive.
|
|
43
|
+
|
|
44
|
+
On every such append:
|
|
45
|
+
|
|
46
|
+
1. Read `.claude/vesper/context/recent-decisions.md` (create it with a `# Recent Decisions` header if missing).
|
|
47
|
+
2. Append the new entry as **one line**: `- YYYY-MM-DD [slug] — <one-sentence summary of what shipped>` (date via the terminal `date` command, consistent with the `history.md` append; `slug` is the story/task slug).
|
|
48
|
+
3. Count the data lines (exclude the header). If the total exceeds **10**, MOVE the oldest `(total - 10)` lines into `.vesper/history-archive/YYYYMM.md` (grouped by the current month, append-style — create the file with a `# Vesper History Archive — YYYY-MM` header if it doesn't exist). Never delete.
|
|
49
|
+
4. Rewrite `recent-decisions.md` so it holds only the newest 10 entries (plus its header).
|
|
50
|
+
|
|
51
|
+
**Why re-trim on every append (not a one-time pop):** `recent-decisions.md` carries `merge=union` in `.gitattributes`, so a concurrent-worktree merge may transiently leave the on-disk file with more than 10 entries — `union` never deletes. This is **expected and self-corrects** on the very next append. Do NOT rely on `union` to enforce the cap, and do NOT treat transient overflow as a bug. This is a normal-mode responsibility, distinct from Compaction Mode below.
|
|
52
|
+
|
|
40
53
|
## Examples
|
|
41
54
|
|
|
42
55
|
**Input:** "Log that Initialization Phase 2a started."
|
|
@@ -74,6 +87,15 @@ This is a **separate, explicitly-invoked mode** — distinct from your normal ap
|
|
|
74
87
|
2. Never touch `refining/`, `backlog/`, `inprogress/`, or `inreview/` — only `completed/`.
|
|
75
88
|
3. Report the count moved and where.
|
|
76
89
|
|
|
90
|
+
### 3. Archive correlated tracking artifacts
|
|
91
|
+
|
|
92
|
+
For each `stories/completed/<slug>` entry older than the same N-day threshold (default 30), move its correlated tracking artifacts — every `research/`, `plans/`, `details/`, `prompts/`, and `changes/` file whose name contains that `<slug>` — into `.vesper/.tracking/archive/YYYYMM/<slug>/` (grouped by the month the story was completed), via terminal `mv`, never delete.
|
|
93
|
+
|
|
94
|
+
1. **Idempotent move**: if the source is already gone and the destination already holds the file, treat it as already done (a concurrent worktree archived it). Never error, never re-move.
|
|
95
|
+
2. **Archive-with-a-flag fallback**: archive regardless of whether `@Feature Wrap and Retrospective Agent` extracted durable knowledge for the slug first. Check the MCP memory graph (or a recorded wrap marker) for a completed feature-wrap for that slug; if none exists, write an empty `.unwrapped` marker file into the archived `<slug>/` folder so `/revalidate-knowledge` treats it as a **priority re-extraction candidate**. This preserves the non-destructive invariant (nothing is lost — archived, just flagged) without blocking retention indefinitely on a wrap step that may legitimately never run (Lightweight-path tasks have no wrap).
|
|
96
|
+
3. **Ordering**: prefer to run after feature-wrap extraction for the slug, but never block indefinitely — the `.unwrapped` flag is the fallback.
|
|
97
|
+
4. Report which slugs were archived and which were flagged `.unwrapped`.
|
|
98
|
+
|
|
77
99
|
### Constraints (Compaction Mode only)
|
|
78
100
|
|
|
79
101
|
- **Never delete** — every rotation/archive is a move, not a removal.
|
|
@@ -99,6 +99,7 @@ For verified trivial edits, Vesper MAY perform the change directly instead of de
|
|
|
99
99
|
|
|
100
100
|
- `<agents>` section in the system prompt — delegate to `@Workspace Learner` instead. Never embed, quote, or forward its contents in any prompt.
|
|
101
101
|
- `<skills>` section in the system prompt — skill assignments come from the Team Roster only
|
|
102
|
+
- Archived knowledge directories — `.vesper/history-archive/`, `.vesper/.tracking/archive/`, and `.vesper/.tracking/stories/completed/archive/` are excluded from all normal-pipeline reads, greps, and searches (and from the `vesper-indexing` index). They hold intentionally retired material and are reachable ONLY via the `#revalidate-knowledge` flow — never read or forward their contents during routine work.
|
|
102
103
|
|
|
103
104
|
### **PACKAGE ASSET PROTECTION**
|
|
104
105
|
|
|
@@ -136,6 +137,8 @@ All workspace-related actions live here: initialization, re-initialization, team
|
|
|
136
137
|
|
|
137
138
|
**Vesper ecosystem**: Agents, instructions, prompts, and skills — all sourced from the Vesper CLI (`vespercli catalog`, `vespercli add`, `vespercli list`). No other source.
|
|
138
139
|
|
|
140
|
+
> **Exception — externally-synced GitLab skills (closed list).** Exactly two skills deviate from "no other source," and only these two: `gitlab-ci-skill` (from `https://gitlab.com/gitlab-org/ci-cd/gitlab-ci-skill.git`) and `github-actions-to-gitlab-ci` (from `https://gitlab.com/gitlab-org/ci-cd/github-actions-to-gitlab-ci.git`). **Location** is fully compliant — both install into the same Vesper-managed plugin dir (`~/.claude/skills/vesper/skills/`) as every other skill, so subagents still look in exactly one place. **Authorship/maintenance** is the sole carve-out — their *content* is pulled fresh from those two upstream GitLab repos on every `init`/`/reinit`/`worktree bootstrap`, rather than authored/vendored by Vesper. This list is closed: adding any third externally-synced skill (any other URL, host, or namespace) is **not** covered by this exception and requires a new documented exception plus architecture-review sign-off before implementation.
|
|
141
|
+
|
|
139
142
|
### State Check (before any work)
|
|
140
143
|
|
|
141
144
|
**Check**: Does `.github/instructions/orchestration.instructions.md` exist with a **Team Roster** section?
|
|
@@ -202,6 +205,8 @@ When workspace is already set up:
|
|
|
202
205
|
|
|
203
206
|
**Persisted-knowledge size check** (independent of the resumption logic above): if `.vesper/memory.jsonl` looks large (roughly >500 entities) or `.vesper/history.md` has grown long (roughly >150 entries), suggest the user run the `#compact-knowledge` prompt — a non-destructive workflow that rotates old history into an archive file and merges stale memory entities, so a *future* session doesn't have to ingest all of it. This is a suggestion, never a blocker — proceed with the user's actual request regardless.
|
|
204
207
|
|
|
208
|
+
**Whitepaper staleness check** (independent of both the resumption logic and the size check above): the always-injected project-context core (`.github/copilot-instructions.md`) carries a Freshness header (`- **Last full re-scan**: YYYY-MM-DD (commit `<7-hex>`)`, `- **Last incremental update**: …`, `- **Last revalidation**: …`; a stamp that never happened reads `never`). Read that header and suggest the user run the `#revalidate-knowledge` prompt when EITHER staleness signal fires: **time drift** — `Last full re-scan` is more than **30 days** old; or **commit drift** — the freshly-fetched base-branch tip is **≥ 25 commits** ahead of the commit recorded in `Last full re-scan`. **Dedupe**: suppress the suggestion if `Last revalidation` is within the last **7 days**. These are the same **30d / 25-commit / 7d** thresholds documented canonically in the Claude orchestrator's staleness block (`assets/claude/vesper-orchestrator.md`) — do not re-derive or diverge them. Suggest-only, never auto-run (`#revalidate-knowledge` reads archives and performs a heavier semantic re-validation — the user's call); proceed with the user's actual request regardless.
|
|
209
|
+
|
|
205
210
|
---
|
|
206
211
|
|
|
207
212
|
## 🔌 MCP Readiness Preflight
|
|
@@ -136,17 +136,33 @@ If `EXISTING_CONTENT` is not empty, apply this merge strategy:
|
|
|
136
136
|
**Step 3c — Write/Edit the file:**
|
|
137
137
|
Use the `edit` tool to generate or update `.github/copilot-instructions.md`.
|
|
138
138
|
|
|
139
|
-
**This file is the single project-context document that helps ALL agents code effectively.**
|
|
139
|
+
**This file is the single always-injected project-context document that helps ALL agents code effectively.** Because it is auto-injected into every session, it is a **two-tier** structure: a bounded, freshness-stamped **slim core** (this file, ≤ 200 lines) plus an **on-demand tier** of `.claude/vesper/context/*.md` files that are NOT auto-injected and are read only when an agent needs that detail. These on-demand files are shared cross-client knowledge (the same canonical location the Claude target and the `history-logger` ring buffer use), alongside the shared `.vesper/` tracking state.
|
|
140
140
|
|
|
141
|
-
**
|
|
141
|
+
**Slim-core — the ONLY sections that belong in the always-injected core:**
|
|
142
142
|
|
|
143
|
-
1. **
|
|
144
|
-
2. **
|
|
145
|
-
3. **
|
|
146
|
-
4. **
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
1. **Freshness header** (see format below) — placed immediately after the H1 title.
|
|
144
|
+
2. **Big Picture Architecture**: Major components, service boundaries, data flows, and the "why" behind decisions.
|
|
145
|
+
3. **Domain Model**: Core business concepts, naming conventions, key user flows — the "what this project does."
|
|
146
|
+
4. **Critical Workflows**: Build, test, and debug commands not obvious from file inspection.
|
|
147
|
+
|
|
148
|
+
Everything else moves to the **on-demand tier**, each replaced in the core by a **one-line pointer** of the form `> Detail: see \`.claude/vesper/context/<topic>.md\``:
|
|
149
|
+
|
|
150
|
+
- `.claude/vesper/context/conventions.md` — project-specific patterns that differ from common practice.
|
|
151
|
+
- `.claude/vesper/context/integrations.md` — external dependencies, cross-component communication, Development Standards / Verification & CI/CD detail.
|
|
152
|
+
- `.claude/vesper/context/technical-debt.md` — known debt / ambiguities.
|
|
153
|
+
- `.claude/vesper/context/recent-decisions.md` — the bounded (N=10) Recent-Decisions ring buffer appended by `@History Logger`; start it with a `# Recent Decisions` header and zero entries.
|
|
154
|
+
|
|
155
|
+
**Freshness header format** (HTML-comment-free, machine-parseable; place it directly under the H1):
|
|
156
|
+
|
|
157
|
+
```markdown
|
|
158
|
+
## Freshness
|
|
159
|
+
|
|
160
|
+
- **Last full re-scan**: YYYY-MM-DD (commit `<7-hex-sha>`)
|
|
161
|
+
- **Last incremental update**: YYYY-MM-DD
|
|
162
|
+
- **Last revalidation**: YYYY-MM-DD
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Parse contract: each stamp is its own bullet `- **Label**: DATE`, DATE is ISO `YYYY-MM-DD`; the re-scan bullet additionally carries `(commit \`<7-hex>\`)`. A stamp that has never occurred takes the literal value `never`. **On a full regen (`/reinit`)** set `Last full re-scan` to today plus the current commit short-sha (`git rev-parse --short HEAD`) AND reset `Last incremental update` to today. `Last revalidation` is set ONLY by the `#revalidate-knowledge` flow — leave it untouched on a full regen (preserve its existing value, or `never` if absent).
|
|
150
166
|
|
|
151
167
|
**This file must NOT contain** (these go in `orchestration.instructions.md`):
|
|
152
168
|
|
|
@@ -155,15 +171,17 @@ Use the `edit` tool to generate or update `.github/copilot-instructions.md`.
|
|
|
155
171
|
- System Prompt Deny-List
|
|
156
172
|
- Agent names, skill assignments, or routing rules
|
|
157
173
|
|
|
174
|
+
**Technical Debt re-validation (on full regen / `/reinit`):** do NOT merely append to `technical-debt.md`. **Re-check every existing bullet against the current code and DROP the ones the code has resolved**, then add newly discovered debt. The Technical Debt file is a live view of what is *currently* broken/ambiguous, not an append-only ledger.
|
|
175
|
+
|
|
158
176
|
**Guidelines:**
|
|
159
177
|
|
|
160
|
-
- **
|
|
178
|
+
- **Slim and scannable**: the core is a hard ≤ 200-line budget (see enforcement below). Push depth into the on-demand tier, not the core.
|
|
161
179
|
- **Specific Examples**: Reference key files/directories or include code snippets to exemplify patterns.
|
|
162
180
|
- **No Fluff**: Avoid generic advice ("write tests", "handle errors"). Focus on THIS project's specific approaches.
|
|
163
181
|
- **Reality Check**: Document only discoverable patterns, not aspirational practices.
|
|
164
182
|
|
|
165
|
-
**Step 3d — Verify:**
|
|
166
|
-
After editing,
|
|
183
|
+
**Step 3d — Verify (line-budget enforcement):**
|
|
184
|
+
After editing, run `wc -l .github/copilot-instructions.md`. **If the core exceeds 200 lines**, extract the lowest-priority sections into the on-demand tier in this order — Conventions → Integrations → Technical Debt → Recent Decisions (i.e. everything outside Big Picture Architecture / Domain Model / Critical Workflows / Freshness) — replacing each with its one-line pointer, then re-run `wc -l` and repeat until ≤ 200 lines. Then use the `read` tool to confirm the file exists, carries the Freshness header, contains only the core sections + one-line pointers, and does NOT contain Team Roster or Task Management sections. Confirm each on-demand file referenced by a pointer actually exists.
|
|
167
185
|
|
|
168
186
|
##### File 2: `.github/instructions/orchestration.instructions.md`
|
|
169
187
|
|
|
@@ -468,6 +486,19 @@ When invoked with a **roster review** request (not a full init/re-init), run thi
|
|
|
468
486
|
7. If Vesper requested validation after this step, return the proposal — Architect validates next.
|
|
469
487
|
8. If Vesper requests application after validation, run Phase 4 Steps 3-6 (install + verify installation + update roster + verify roster against orchestration instructions) scoped to only the approved changes.
|
|
470
488
|
|
|
489
|
+
## 🔁 Knowledge Revalidation Mode (`#revalidate-knowledge` only)
|
|
490
|
+
|
|
491
|
+
A separate, user-invoked mode (Vesper suggests it on staleness/drift, never auto-runs it). You own the whitepaper/archive side; `@Feature Wrap and Retrospective Agent` runs the memory-graph side in parallel. Your job: **rescan → revalidate → re-balance**.
|
|
492
|
+
|
|
493
|
+
### Steps
|
|
494
|
+
|
|
495
|
+
1. **Reindex first**: call `vesper_reindex` with `{ "full": true }` (your standard mandatory reindex-first workflow) so revalidation runs against the current code.
|
|
496
|
+
2. **Review archived content** — read `.vesper/history-archive/` and `.vesper/.tracking/archive/`. This mode is the ONLY sanctioned reason to read these otherwise off-limits directories (they are excluded from the index and from all normal-pipeline reads). Revalidate the durable knowledge they captured against the current code; correct or drop anything the code no longer supports. **Prioritize `.unwrapped`-flagged archives** (slugs archived without a feature-wrap) for knowledge re-extraction.
|
|
497
|
+
3. **Re-balance the core/on-demand split** — re-derive the slim core (Freshness header + Big Picture Architecture + Domain Model + Critical Workflows only) and the `.claude/vesper/context/*.md` on-demand tier, re-running the ≤ 200-line `wc -l` budget check and extracting any overflow (order: Conventions → Integrations → Technical Debt → Recent Decisions).
|
|
498
|
+
4. **Re-validate Technical Debt** — drop bullets the current code has resolved; keep/append only what still holds.
|
|
499
|
+
5. **Set the freshness stamp** — set `Last revalidation` in the core Freshness header to today's date (ISO `YYYY-MM-DD`). Leave `Last full re-scan` and its commit untouched unless you also did a full re-scan.
|
|
500
|
+
6. Report what was revalidated, corrected, dropped, re-extracted (especially from `.unwrapped` archives), and re-balanced.
|
|
501
|
+
|
|
471
502
|
## Terminal Discipline
|
|
472
503
|
|
|
473
504
|
- **Timeout**: Every command gets one. Quick=15s, build=120s, test=300s. Default=30s.
|
|
@@ -8,7 +8,7 @@ Compact persisted Vesper knowledge — distinct from Claude Code's `/compact` or
|
|
|
8
8
|
|
|
9
9
|
Delegate:
|
|
10
10
|
|
|
11
|
-
1. `@History Logger` in Compaction Mode: rotate `.vesper/history.md` (archive entries older than the last 30 into `.vesper/history-archive/YYYYMM.md`)
|
|
11
|
+
1. `@History Logger` in Compaction Mode: rotate `.vesper/history.md` (archive entries older than the last 30 into `.vesper/history-archive/YYYYMM.md`), archive `.vesper/.tracking/stories/completed/` entries older than 30 days, and archive each completed story's correlated `research/plans/details/prompts/changes` tracking artifacts into `.vesper/.tracking/archive/YYYYMM/<slug>/` (idempotent move; flag any slug with no recorded feature-wrap as `.unwrapped` so `/revalidate-knowledge` re-extracts it).
|
|
12
12
|
2. `@Feature Wrap and Retrospective Agent` in Memory Compaction Mode: merge/dedupe stale entities in the MCP memory graph, never touching `current_task` or active entities.
|
|
13
13
|
|
|
14
14
|
Report what was archived/merged from both. Nothing is deleted — only moved to archive files or consolidated within the memory graph.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Revalidate archived Vesper knowledge against the current codebase and re-balance the slim-core/on-demand context split — a heavier, semantic re-validation pass distinct from /compact-knowledge trim/dedupe.'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Revalidate Knowledge
|
|
6
|
+
|
|
7
|
+
Re-establish the truth of the project whitepaper. Unlike `#compact-knowledge` (which is triggered on *size* and only trims/dedupes/archives non-destructively), this flow is triggered on *staleness/drift* and performs a genuine **semantic re-validation** of previously captured knowledge against the code as it actually is today. This is **user-invoked** — Vesper only ever *suggests* it (on staleness signals), never auto-runs it.
|
|
8
|
+
|
|
9
|
+
Delegate in parallel:
|
|
10
|
+
|
|
11
|
+
1. `@Workspace Learner` (inherits its mandatory reindex-first workflow):
|
|
12
|
+
- **Review all archived content** — `.vesper/history-archive/` and `.vesper/.tracking/archive/` (the only sanctioned reason to read these otherwise off-limits directories). Revalidate the durable knowledge they captured against the current code and decisions; correct or drop anything the code no longer supports. **Prioritize `.unwrapped`-flagged archives** (`/compact-knowledge` tags archived slugs that never got a feature-wrap) for knowledge re-extraction first.
|
|
13
|
+
- **Re-balance the context split** — re-derive the slim core (`.claude/vesper/context.md`: Big Picture Architecture + Domain Model + Critical Workflows + Freshness header only, ≤200 lines) and the on-demand tier (`.claude/vesper/context/{conventions,integrations,technical-debt,recent-decisions}.md`), extracting any core overflow back into the on-demand files.
|
|
14
|
+
- **Re-validate Technical Debt** — drop bullets the current code has resolved; keep/append only what still holds.
|
|
15
|
+
- On completion, set the `Last revalidation` stamp in the core Freshness header to today's date (per the freshness parse contract).
|
|
16
|
+
|
|
17
|
+
2. `@Feature Wrap and Retrospective Agent` (memory-graph side): merge/dedupe and re-validate stale entities in the MCP memory graph against the revalidated whitepaper, never touching `current_task` or active entities.
|
|
18
|
+
|
|
19
|
+
Report what was revalidated, corrected, dropped, re-extracted (especially from `.unwrapped` archives), and re-balanced. Nothing is deleted — outdated knowledge is corrected in place or consolidated; source archives remain on disk.
|
|
@@ -21,6 +21,7 @@ Universal operating rules for every agent in the Vesper ecosystem. These are non
|
|
|
21
21
|
- Results include actual source code — skip `read_file` unless you need wider surrounding context.
|
|
22
22
|
- If the index is empty or MCP unavailable → **STOP and report**. Do NOT silently fall back to directory traversals or `find` commands.
|
|
23
23
|
- For broader exploration beyond indexed content: `grep_search`, `semantic_search`, `file_search` are acceptable secondary tools.
|
|
24
|
+
- **Archives are off-limits in normal pipelines**: never read, grep, or search `.vesper/history-archive/` or `.vesper/.tracking/archive/` during ordinary work — they are index-excluded and reachable only via `/revalidate-knowledge`. See [codebase-query.md](references/codebase-query.md).
|
|
24
25
|
|
|
25
26
|
## Terminal Discipline
|
|
26
27
|
|
|
@@ -51,6 +52,20 @@ See [tool-usage-patterns.md](references/tool-usage-patterns.md) for comprehensiv
|
|
|
51
52
|
| Edit a file | `replace_string_in_file` | `sed -i`, `node -e "fs.writeFileSync()"` |
|
|
52
53
|
| Check errors | `get_errors` | Manual terminal compilation |
|
|
53
54
|
|
|
55
|
+
## Secret & Credential Handling
|
|
56
|
+
|
|
57
|
+
**NEVER write a secret to a file.** No token, API key, password, private key, or connection string carrying an embedded secret may be written into any file you create (`create_file`) or edit (`replace_string_in_file`) — regardless of git host, language, or task.
|
|
58
|
+
|
|
59
|
+
| Trigger | Required Action |
|
|
60
|
+
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| A value about to be written looks like a token/credential/secret | **STOP** — do not write it. Require explicit user confirmation before proceeding. |
|
|
62
|
+
| You are a subagent and cannot ask the user directly | **Escalate, don't write** — surface the blocker and stop (same reflex as the Codebase Query Protocol's "STOP and report"), rather than silently writing the secret. |
|
|
63
|
+
| The user explicitly approves writing the value | Proceed, then **record the approved exception** back into the project's instructions (`CLAUDE.md` or the relevant `.claude/vesper/*.md`) so the same value isn't re-flagged on a later pass. |
|
|
64
|
+
|
|
65
|
+
- Detection is on the **value**, not the file: a secret-shaped string (a long random token, `ghp_…`/`glpat-…`-style prefixes, a PEM `-----BEGIN … PRIVATE KEY-----` block, a `user:password@host` connection URL) triggers the stop — even inside configs, tests, or docs.
|
|
66
|
+
- Prefer a placeholder or environment-variable reference (`${MY_TOKEN}`) over the literal secret whenever a file genuinely needs the name.
|
|
67
|
+
- When in doubt, halt and surface it — never silently work around it.
|
|
68
|
+
|
|
54
69
|
## Response Standards
|
|
55
70
|
|
|
56
71
|
- **Be direct**: State findings, don't narrate your process.
|
|
@@ -11,6 +11,10 @@ How Vesper agents should explore and understand any codebase.
|
|
|
11
11
|
4. run_in_terminal (LAST RESORT — only for operations with no built-in equivalent)
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
## Archive Exclusion (normal pipelines)
|
|
15
|
+
|
|
16
|
+
Archived knowledge directories — `.vesper/history-archive/`, `.vesper/.tracking/archive/`, and `.vesper/.tracking/stories/completed/archive/` — are **excluded from all normal-pipeline reads, greps, and searches**. They are also excluded from the `vesper-indexing` index (`DEFAULT_EXCLUDES`), so `vesper_search`/`vesper_symbols` never surface their contents. Do NOT `grep_search`, `read_file`, or otherwise crawl these paths during ordinary research, planning, implementation, or review work. They hold intentionally retired material (rotated history, archived tracking artifacts) and are reachable **only** through the explicit `/revalidate-knowledge` flow, which re-validates archived knowledge against current code. If you think you need something from an archive, that is a signal to surface `/revalidate-knowledge` to the user — not to read the archive directly.
|
|
17
|
+
|
|
14
18
|
## vesper-indexing MCP Tools
|
|
15
19
|
|
|
16
20
|
### vesper_search
|
package/assets/hooks/pre-commit
CHANGED
|
@@ -13,13 +13,29 @@
|
|
|
13
13
|
# never touches hook content outside its own marked section.
|
|
14
14
|
|
|
15
15
|
# <!-- vesper:hook:start -->
|
|
16
|
-
vesper_git_paths=".claude/vesper/orchestration.md .claude/vesper/context.md .vesper/history.md .vesper/.tracking .vesper/memory.jsonl CLAUDE.md .github/copilot-instructions.md"
|
|
16
|
+
vesper_git_paths=".claude/vesper/orchestration.md .claude/vesper/context.md .claude/skills .claude/rules .vesper/skills .vesper/instructions .vesper/history.md .vesper/.tracking .vesper/memory.jsonl CLAUDE.md .github/copilot-instructions.md"
|
|
17
17
|
|
|
18
18
|
staged=$(git diff --cached --name-only)
|
|
19
19
|
if [ -z "$staged" ]; then
|
|
20
20
|
exit 0
|
|
21
21
|
fi
|
|
22
22
|
|
|
23
|
+
# Hard guardrail: mr.json is the recovery artifact written by
|
|
24
|
+
# `glab mr create --recover`/`--recovery`. It is a transient local scratch file,
|
|
25
|
+
# never something to commit. The gitlab-guardrails skill advises against it, but
|
|
26
|
+
# skill loading is probabilistic — this hook makes the block an actual gate.
|
|
27
|
+
for f in $staged; do
|
|
28
|
+
case "$f" in
|
|
29
|
+
mr.json|*/mr.json)
|
|
30
|
+
echo "vesper: refusing to commit '$f'." >&2
|
|
31
|
+
echo " mr.json is a blocked recovery artifact from 'glab mr create --recover'." >&2
|
|
32
|
+
echo " Remove it from the commit and gitignore it:" >&2
|
|
33
|
+
echo " git restore --staged \"$f\" && echo mr.json >> .gitignore" >&2
|
|
34
|
+
exit 1
|
|
35
|
+
;;
|
|
36
|
+
esac
|
|
37
|
+
done
|
|
38
|
+
|
|
23
39
|
is_vesper_path() {
|
|
24
40
|
candidate="$1"
|
|
25
41
|
for p in $vesper_git_paths; do
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"generated": "2026-07-19T18:29:56.188Z",
|
|
4
|
+
"description": "Available Vesper assets. Use with: vespercli add agents|prompts|instructions|skills <name>",
|
|
5
|
+
"agents": [],
|
|
6
|
+
"prompts": [],
|
|
7
|
+
"instructions": [],
|
|
8
|
+
"skills": [
|
|
9
|
+
"aesthetic",
|
|
10
|
+
"ai-multimodal",
|
|
11
|
+
"backend-development",
|
|
12
|
+
"better-auth",
|
|
13
|
+
"chrome-devtools",
|
|
14
|
+
"code-review",
|
|
15
|
+
"databases",
|
|
16
|
+
"debugging",
|
|
17
|
+
"devops",
|
|
18
|
+
"docs-seeker",
|
|
19
|
+
"document-skills",
|
|
20
|
+
"frontend-design",
|
|
21
|
+
"gitlab-guardrails",
|
|
22
|
+
"google-adk-python",
|
|
23
|
+
"mcp-builder",
|
|
24
|
+
"mermaidjs-v11",
|
|
25
|
+
"premium-frontend-ui",
|
|
26
|
+
"problem-solving",
|
|
27
|
+
"react-mui-tanstack",
|
|
28
|
+
"sequential-thinking",
|
|
29
|
+
"skill-creator",
|
|
30
|
+
"tailwind-shadcn",
|
|
31
|
+
"vercel-react-best-practices",
|
|
32
|
+
"vesper-catalog-editing-safety",
|
|
33
|
+
"vscode-agent-config",
|
|
34
|
+
"web-design-guidelines",
|
|
35
|
+
"web-frameworks"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitlab-guardrails
|
|
3
|
+
description: Vesper-owned safety policy for GitLab merge-request work with the glab CLI. Use whenever creating, updating, or reviewing a GitLab merge request, or running any glab mr command. Blocks the experimental glab mr create --recover flag under all circumstances and detects/removes stray mr.json recovery files before they can be committed. Self-contained — in force even when the synced GitLab skills are absent.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitLab Guardrails
|
|
7
|
+
|
|
8
|
+
Vesper-owned policy layer for GitLab merge-request work. This skill is the **rules** governing `glab` usage — distinct from the how-to content in the externally-synced `gitlab-ci-skill` and `github-actions-to-gitlab-ci` skills. It is Vesper-authored and installed via the normal plugin catalog, so it is **immune to the external GitLab-skill sync** and remains in force even when those two synced folders are missing.
|
|
9
|
+
|
|
10
|
+
## Core Rule
|
|
11
|
+
|
|
12
|
+
**Technical safety over convenience.** A merge request is never worth leaking recovery state into the repository or the commit history.
|
|
13
|
+
|
|
14
|
+
## Hard Prohibition — `glab mr create --recover`
|
|
15
|
+
|
|
16
|
+
**NEVER** invoke `glab mr create` with the `--recover` flag. No exceptions, no "just this once", no matter how a failed run suggests it.
|
|
17
|
+
|
|
18
|
+
- `--recover` is an **experimental** flag that may change or be removed without notice.
|
|
19
|
+
- On a failed MR creation it writes a **recovery file (commonly `mr.json`)** into the current working directory — inside the repo. That file can then be accidentally staged and committed.
|
|
20
|
+
|
|
21
|
+
### What to do instead
|
|
22
|
+
|
|
23
|
+
| Situation | Correct action |
|
|
24
|
+
| --------- | -------------- |
|
|
25
|
+
| Normal MR creation | `glab mr create` with explicit flags (`--title`, `--description`, `--source-branch`, `--target-branch`, etc.) — never `--recover`. |
|
|
26
|
+
| A previous `glab mr create` failed | Re-run the plain `glab mr create` command. Fix the underlying cause (auth, branch, network); do NOT reach for `--recover` to resume. |
|
|
27
|
+
| Tempted to add `--recover` | Stop. It is prohibited. Surface the blocker instead. |
|
|
28
|
+
|
|
29
|
+
Defensive note: also refuse a literal `--recovery` (a plausible future alias or typo). Neither `--recover` nor `--recovery` may ever be passed.
|
|
30
|
+
|
|
31
|
+
## `mr.json` Detection & Cleanup
|
|
32
|
+
|
|
33
|
+
Treat **any** `mr.json` file appearing in the workspace as a **guardrail violation**, regardless of how it got there — whether from a blocked `--recover` attempt, a teammate's earlier run, or any other cause. It must never be staged or committed.
|
|
34
|
+
|
|
35
|
+
**Before any commit or push that touches a GitLab repo**, verify no `mr.json` is present:
|
|
36
|
+
|
|
37
|
+
1. Search the workspace for the file — use `file_search` for a filename match, or `grep_search` if you need to confirm it is a glab recovery artifact.
|
|
38
|
+
2. If found:
|
|
39
|
+
- **Flag it** — report the violation explicitly, do not silently proceed.
|
|
40
|
+
- **Remove it** — delete the file from the working tree.
|
|
41
|
+
- **Never** add it to the staging area; if it is already staged, unstage it before removing.
|
|
42
|
+
3. Only after the workspace is confirmed free of `mr.json` may the commit/push proceed.
|
|
43
|
+
|
|
44
|
+
This check is mandatory and independent of whether `--recover` was ever used in the current session — a stray `mr.json` from any origin is a stop condition.
|
|
45
|
+
|
|
46
|
+
## Self-Contained Guarantee
|
|
47
|
+
|
|
48
|
+
This `--recover` / `mr.json` policy is **fully self-contained**. It applies:
|
|
49
|
+
|
|
50
|
+
- Even when the externally-synced GitLab skills (`gitlab-ci-skill`, `github-actions-to-gitlab-ci`) are **absent** — e.g. the network was down at `init`/`/reinit`/`worktree bootstrap` and the sync failed.
|
|
51
|
+
- Regardless of whether any `.gitlab-ci.yml` or migration work is happening.
|
|
52
|
+
|
|
53
|
+
The guardrail's value is **highest in a degraded environment**. Never read it as "only applies when the synced GitLab skills are present."
|
|
54
|
+
|
|
55
|
+
## Relationship to the Synced GitLab Skills (advisory only)
|
|
56
|
+
|
|
57
|
+
These cross-references are convenience pointers, not dependencies — this skill functions fully without them:
|
|
58
|
+
|
|
59
|
+
- For authoring or debugging `.gitlab-ci.yml` pipelines, consult the synced **`gitlab-ci-skill`** skill.
|
|
60
|
+
- For migrating GitHub Actions workflows to GitLab CI, consult the synced **`github-actions-to-gitlab-ci`** skill.
|
|
61
|
+
|
|
62
|
+
Those two skills document GitLab CI and `glab` usage; this skill supplies the Vesper-owned safety policy they do not contain.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"name": "react-mui-tanstack",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"generated": "2026-07-19T18:29:56.205Z",
|
|
5
|
+
"files": [
|
|
6
|
+
"SKILL.md",
|
|
7
|
+
"resources/common-patterns.md",
|
|
8
|
+
"resources/complete-examples.md",
|
|
9
|
+
"resources/component-patterns.md",
|
|
10
|
+
"resources/data-fetching.md",
|
|
11
|
+
"resources/file-organization.md",
|
|
12
|
+
"resources/loading-and-error-states.md",
|
|
13
|
+
"resources/performance.md",
|
|
14
|
+
"resources/routing-guide.md",
|
|
15
|
+
"resources/styling-guide.md",
|
|
16
|
+
"resources/typescript-standards.md"
|
|
17
|
+
]
|
|
18
18
|
}
|