@mthanh/vespercli 1.6.0 → 1.7.1

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.
Files changed (59) hide show
  1. package/README.md +26 -1
  2. package/assets/CATALOG.md +13 -1
  3. package/assets/claude/agents/feature-wrap-document.md +32 -10
  4. package/assets/claude/agents/history-logger.md +23 -1
  5. package/assets/claude/agents/workspace-learner.md +45 -12
  6. package/assets/claude/commands/compact-knowledge.md +1 -1
  7. package/assets/claude/commands/revalidate-knowledge.md +17 -0
  8. package/assets/claude/context.md.tpl +38 -14
  9. package/assets/claude/skills/agent-fundamentals/SKILL.md +1 -0
  10. package/assets/claude/skills/agent-fundamentals/references/codebase-query.md +4 -0
  11. package/assets/claude/skills/vesper-catalog-editing-safety/SKILL.md +141 -0
  12. package/assets/claude/vesper-orchestrator.md +8 -0
  13. package/assets/core/agents/feature-wrap-document.agent.md +18 -1
  14. package/assets/core/agents/history-logger.agent.md +23 -1
  15. package/assets/core/agents/vesper.agent.md +3 -0
  16. package/assets/core/agents/workspace-learner.agent.md +43 -12
  17. package/assets/core/prompts/compact-knowledge.prompt.md +1 -1
  18. package/assets/core/prompts/revalidate-knowledge.prompt.md +19 -0
  19. package/assets/core/skills/agent-fundamentals/SKILL.md +1 -0
  20. package/assets/core/skills/agent-fundamentals/references/codebase-query.md +4 -0
  21. package/assets/manifest.json +2 -1
  22. package/assets/skills/aesthetic/manifest.json +1 -1
  23. package/assets/skills/ai-multimodal/manifest.json +1 -1
  24. package/assets/skills/backend-development/manifest.json +1 -1
  25. package/assets/skills/better-auth/manifest.json +1 -1
  26. package/assets/skills/chrome-devtools/manifest.json +1 -1
  27. package/assets/skills/code-review/manifest.json +1 -1
  28. package/assets/skills/databases/manifest.json +1 -1
  29. package/assets/skills/debugging/manifest.json +1 -1
  30. package/assets/skills/devops/manifest.json +1 -1
  31. package/assets/skills/docs-seeker/manifest.json +1 -1
  32. package/assets/skills/document-skills/manifest.json +1 -1
  33. package/assets/skills/frontend-design/manifest.json +1 -1
  34. package/assets/skills/gitlab-guardrails/manifest.json +1 -1
  35. package/assets/skills/google-adk-python/manifest.json +1 -1
  36. package/assets/skills/mcp-builder/manifest.json +1 -1
  37. package/assets/skills/mermaidjs-v11/manifest.json +1 -1
  38. package/assets/skills/premium-frontend-ui/manifest.json +1 -1
  39. package/assets/skills/problem-solving/manifest.json +1 -1
  40. package/assets/skills/react-mui-tanstack/manifest.json +1 -1
  41. package/assets/skills/sequential-thinking/manifest.json +1 -1
  42. package/assets/skills/skill-creator/manifest.json +1 -1
  43. package/assets/skills/tailwind-shadcn/manifest.json +1 -1
  44. package/assets/skills/vercel-react-best-practices/manifest.json +1 -1
  45. package/assets/skills/vesper-catalog-editing-safety/SKILL.md +141 -0
  46. package/assets/skills/vesper-catalog-editing-safety/manifest.json +8 -0
  47. package/assets/skills/vscode-agent-config/manifest.json +1 -1
  48. package/assets/skills/web-design-guidelines/manifest.json +1 -1
  49. package/assets/skills/web-frameworks/manifest.json +1 -1
  50. package/dist/cli.min.js +20 -20
  51. package/package.json +1 -1
  52. package/scripts/postinstall.js +15 -4
  53. package/src/mcp/vesper-indexing/dist/constants.d.ts.map +1 -1
  54. package/src/mcp/vesper-indexing/dist/constants.js +3 -0
  55. package/src/mcp/vesper-indexing/dist/constants.js.map +1 -1
  56. package/src/mcp/vesper-indexing/dist/index.js +17 -1
  57. package/src/mcp/vesper-indexing/dist/index.js.map +1 -1
  58. package/src/mcp/vesper-indexing/package-lock.json +2 -2
  59. package/src/mcp/vesper-indexing/package.json +1 -1
@@ -63,6 +63,7 @@ For verified trivial edits, Vesper MAY perform the change directly instead of de
63
63
  **What you may NOT read or forward** (for decision-making, routing, analysis, or subagent prompts — ever):
64
64
 
65
65
  - Subagent definition file contents — you route by name, subagents read their own definitions
66
+ - 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.
66
67
 
67
68
  **Fallback**: If no agent on the Team Roster matches a task, delegate to `technical-product-manager`.
68
69
 
@@ -222,6 +223,13 @@ Then **classify and route the new task as normal** — do not block on it. `/com
222
223
 
223
224
  **Sibling suggestion — persisted knowledge, not context window**: `/compact` only summarizes *this conversation's* context window. It doesn't shrink what's on disk. At the same new-task detection point, if `.vesper/memory.jsonl` looks large (roughly >500 entities, or the file is large enough that a `read_graph` response feels unwieldy) or `.vesper/history.md` has grown long (roughly >150 entries), separately suggest `/compact-knowledge` — a different, 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. These two suggestions are independent: don't conflate them, and don't block on either.
224
225
 
226
+ **Sibling suggestion — whitepaper staleness (`/revalidate-knowledge`)**: also independent of the two above. The slim-core whitepaper (`.claude/vesper/context.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`). At the same new-task detection point, read that header and suggest the user run `/revalidate-knowledge` when EITHER staleness signal fires:
227
+
228
+ - **Time drift**: `Last full re-scan` is more than **30 days** old (relative to today).
229
+ - **Commit drift**: the freshly-fetched base-branch tip (kept current by the worktree base-branch-freshness flow) is **≥ 25 commits** ahead of the commit recorded in `Last full re-scan`.
230
+
231
+ **Dedupe**: suppress the suggestion if `Last revalidation` is within the last **7 days**. This block is the single canonical home for these three tunables — **30 days / 25 commits / 7 days**; any other orchestrator that mirrors this behavior references these same numbers rather than re-deriving them. The suggestion is non-blocking and **suggest-only — never auto-run `/revalidate-knowledge`** (it reads archives and performs a heavier semantic re-validation, which is the user's call). It is independent of `/compact` and `/compact-knowledge`; phrase it like: "The project whitepaper's last full re-scan was [N] days ago / the base branch is [N] commits ahead — consider `/revalidate-knowledge` to re-validate captured knowledge against the current code. I'll proceed either way."
232
+
225
233
  ### Classify the request
226
234
 
227
235
  Classify every user request into exactly one purpose:
@@ -135,6 +135,8 @@ START: Is this a RULE about how to write/modify code?
135
135
 
136
136
  You MUST present ALL proposed updates as a numbered summary, then wait for user to approve by number (partial approval supported).
137
137
 
138
+ **Scope of this approval gate (important):** this numbered-approval workflow applies ONLY to genuinely **structural** edits of the injected `.github/copilot-instructions.md` core (Big Picture Architecture / Domain Model / Critical Workflows) and of the on-demand tier's Conventions / Integrations / Technical Debt files (`.claude/vesper/context/{conventions,integrations,technical-debt}.md`, Claude-namespaced but shared across targets). It does **NOT** cover the trivial, high-frequency `.claude/vesper/context/recent-decisions.md` ring-buffer append after an Implementation completion — that bounded self-healing trim-to-N append is `@History Logger`'s job (its Recent-Decisions Ring Buffer responsibility), runs unattended in parallel with the `history.md` append, and must never be routed through this approval loop. Do not propose or apply `recent-decisions.md` line appends here.
139
+
138
140
  ### Step 1: Analyze and Generate All Proposals
139
141
 
140
142
  You WILL:
@@ -519,11 +521,14 @@ You WILL respond to these user commands:
519
521
  - **READ**: Use any read tool across entire workspace for analysis
520
522
  - **WRITE**: Modify files ONLY after explicit user approval by number
521
523
  - **ALLOWED WRITES**:
522
- - `.vesper/instructions/*.instructions.md`
524
+ - `.vesper/instructions/*.instructions.md` (coding rules/conventions — Copilot's per-rule instruction files, wired via `chat.instructionsFilesLocations`, kept OUT of the auto-injected `.github/copilot-instructions.md` core)
525
+ - `.claude/vesper/context/conventions.md`, `.claude/vesper/context/integrations.md`, `.claude/vesper/context/technical-debt.md` — shared on-demand tier (default home for durable whitepaper Conventions / Integrations / Technical Debt; Claude-namespaced paths shared across targets)
526
+ - `.github/copilot-instructions.md` — structural slim-core only (Big Picture Architecture / Domain Model / Critical Workflows / Freshness); bump `Last incremental update` on a gated structural edit
523
527
  - `.vesper/skills/**/SKILL.md`
524
528
  - `docs/*.md`
525
529
  - `README.md`
526
530
  - **FORBIDDEN WRITES**:
531
+ - `.claude/vesper/context/recent-decisions.md` — `@History Logger`'s ring buffer, never written here
527
532
  - Source code files (unless explicitly requested)
528
533
  - Configuration files
529
534
  - Planning/tracking files (`.vesper/.tracking/*`)
@@ -571,6 +576,18 @@ A **separate, explicitly-invoked mode**, distinct from your normal per-task memo
571
576
 
572
577
  **Never** perform this compaction as a side effect of a normal feature-wrap invocation — only when explicitly asked for compaction.
573
578
 
579
+ ## 🔁 Knowledge Revalidation Mode (`/revalidate-knowledge` only — never the default behavior)
580
+
581
+ A **separate, explicitly-invoked mode**, distinct from both your normal per-task memory-update job and Memory Compaction Mode above. Runs when Vesper delegates the `/revalidate-knowledge` flow (user-invoked, suggested on staleness/drift). `@Workspace Learner` handles the whitepaper/archive-revalidation and core/on-demand re-balance side of the same request in parallel — this mode is scoped to the **memory graph only**, and unlike Compaction Mode (which just merges/dedupes on *size*) it **re-validates** entities against the freshly revalidated whitepaper and current code.
582
+
583
+ 1. `read_graph()` (or `search_nodes` broadly) to see the full set of entities.
584
+ 2. Cross-check durable entities (`workspace_pattern`, `preference`, architecture/decision entities) against the current code and `@Workspace Learner`'s revalidated `.claude/vesper/context.md` core + on-demand tier. Correct observations the code no longer supports; add a `supersedes` relation rather than silently rewriting, so the correction is traceable.
585
+ 3. Give priority to knowledge tied to `.unwrapped`-flagged archives (slugs archived without a feature-wrap) — re-extract any durable learning those tracking artifacts still hold into the graph.
586
+ 4. Merge/dedupe as in Compaction Mode where entities are now redundant post-revalidation. Never touch `current_task` or anything with an active relation.
587
+ 5. Report: entities revalidated, corrected, superseded, and re-extracted from flagged archives.
588
+
589
+ **Never** perform revalidation as a side effect of a normal feature-wrap invocation — only when explicitly asked via `/revalidate-knowledge`.
590
+
574
591
  ## Terminal Discipline
575
592
 
576
593
  - **Tools-first, terminal-last**: Never use terminal for tasks built-in tools handle (`read_file`, `grep_search`, `file_search`, `create_file`, `replace_string_in_file`). Never use `python -c`, `node -e`, or shell commands to read, write, or modify files.
@@ -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."
@@ -70,10 +83,19 @@ This is a **separate, explicitly-invoked mode** — distinct from your normal ap
70
83
 
71
84
  ### 2. Archive completed tracking stories
72
85
 
73
- 1. List `.vesper/.tracking/stories/completed/`. For story files older than N days (default 30, or as specified), move them (via terminal `mv`, not delete) into `.vesper/.tracking/stories/completed/archive/YYYYMM/`, grouped by the month they were completed.
86
+ 1. List `.vesper/.tracking/stories/completed/`. Move **every** story file found there (via terminal `mv`, not delete) into `.vesper/.tracking/stories/completed/archive/YYYYMM/`, grouped by the month they were completed. There is no age condition — every run archives the entire current contents of `completed/`.
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 archived in Step 2 (i.e., every completed story, unconditionally — this section no longer applies its own separate age gate; it always runs for whatever Step 2 just archived), 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
 
@@ -204,6 +205,8 @@ When workspace is already set up:
204
205
 
205
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.
206
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
+
207
210
  ---
208
211
 
209
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.** It replaces any separate workspace-learning file — all deep analysis goes here.
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
- **Required sections:**
141
+ **Slim-core — the ONLY sections that belong in the always-injected core:**
142
142
 
143
- 1. **Big Picture Architecture**: Major components, service boundaries, data flows, and the "why" behind decisions.
144
- 2. **Development Standards**: Language versions, frameworks, linting, package managers, build tools — the "how we write code here."
145
- 3. **Verification & CI/CD**: Test framework, coverage expectations, CI pipeline, how to run/debug tests locally.
146
- 4. **Domain Model**: Core business concepts, naming conventions, key user flows — the "what this project does."
147
- 5. **Critical Workflows**: Build, test, and debug commands not obvious from file inspection.
148
- 6. **Conventions**: Project-specific patterns that differ from common practices.
149
- 7. **Integrations**: External dependencies and cross-component communication.
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
- - **Comprehensive but scannable**: Aim for ~50-100 lines using markdown structure. This is the primary context document — it should be thorough.
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, use the `read` tool to confirm `.github/copilot-instructions.md` exists, contains all required sections (Architecture, Development Standards, Verification, Domain Model, Workflows, Conventions, Integrations), and does NOT contain Team Roster or Task Management sections.
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`) and archive `.vesper/.tracking/stories/completed/` entries older than 30 days.
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 **every** `.vesper/.tracking/stories/completed/` entry unconditionally, 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
 
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "generated": "2026-07-18T13:27:53.808Z",
3
+ "generated": "2026-07-19T18:29:56.188Z",
4
4
  "description": "Available Vesper assets. Use with: vespercli add agents|prompts|instructions|skills <name>",
5
5
  "agents": [],
6
6
  "prompts": [],
@@ -29,6 +29,7 @@
29
29
  "skill-creator",
30
30
  "tailwind-shadcn",
31
31
  "vercel-react-best-practices",
32
+ "vesper-catalog-editing-safety",
32
33
  "vscode-agent-config",
33
34
  "web-design-guidelines",
34
35
  "web-frameworks"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aesthetic",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.811Z",
4
+ "generated": "2026-07-19T18:29:56.191Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "assets/design-guideline-template.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-multimodal",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.812Z",
4
+ "generated": "2026-07-19T18:29:56.192Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/audio-processing.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-development",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.813Z",
4
+ "generated": "2026-07-19T18:29:56.193Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/backend-api-design.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "better-auth",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.814Z",
4
+ "generated": "2026-07-19T18:29:56.194Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/advanced-features.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chrome-devtools",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.815Z",
4
+ "generated": "2026-07-19T18:29:56.195Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/cdp-domains.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "code-review",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.815Z",
4
+ "generated": "2026-07-19T18:29:56.195Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/code-review-reception.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "databases",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.816Z",
4
+ "generated": "2026-07-19T18:29:56.196Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/mongodb-aggregation.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "debugging",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.817Z",
4
+ "generated": "2026-07-19T18:29:56.198Z",
5
5
  "files": [
6
6
  "defense-in-depth/SKILL.md",
7
7
  "root-cause-tracing/SKILL.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devops",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.818Z",
4
+ "generated": "2026-07-19T18:29:56.199Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/browser-rendering.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docs-seeker",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.819Z",
4
+ "generated": "2026-07-19T18:29:56.199Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "WORKFLOWS.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "document-skills",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.821Z",
4
+ "generated": "2026-07-19T18:29:56.201Z",
5
5
  "files": [
6
6
  "docx/LICENSE.txt",
7
7
  "docx/SKILL.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frontend-design",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.822Z",
4
+ "generated": "2026-07-19T18:29:56.202Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/animejs.md"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gitlab-guardrails",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.823Z",
4
+ "generated": "2026-07-19T18:29:56.202Z",
5
5
  "files": [
6
6
  "SKILL.md"
7
7
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "google-adk-python",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.823Z",
4
+ "generated": "2026-07-19T18:29:56.203Z",
5
5
  "files": [
6
6
  "SKILL.md"
7
7
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcp-builder",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.824Z",
4
+ "generated": "2026-07-19T18:29:56.203Z",
5
5
  "files": [
6
6
  "LICENSE.txt",
7
7
  "SKILL.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mermaidjs-v11",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.825Z",
4
+ "generated": "2026-07-19T18:29:56.204Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/cli-usage.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "premium-frontend-ui",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.825Z",
4
+ "generated": "2026-07-19T18:29:56.204Z",
5
5
  "files": [
6
6
  "SKILL.md"
7
7
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "problem-solving",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.826Z",
4
+ "generated": "2026-07-19T18:29:56.205Z",
5
5
  "files": [
6
6
  "ABOUT.md",
7
7
  "collision-zone-thinking/SKILL.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-mui-tanstack",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.827Z",
4
+ "generated": "2026-07-19T18:29:56.205Z",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "resources/common-patterns.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sequential-thinking",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.827Z",
4
+ "generated": "2026-07-19T18:29:56.206Z",
5
5
  "files": [
6
6
  "README.md",
7
7
  "SKILL.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "skill-creator",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.828Z",
4
+ "generated": "2026-07-19T18:29:56.206Z",
5
5
  "files": [
6
6
  "LICENSE.txt",
7
7
  "SKILL.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tailwind-shadcn",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.829Z",
4
+ "generated": "2026-07-19T18:29:56.207Z",
5
5
  "files": [
6
6
  "LICENSE.txt",
7
7
  "SKILL.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vercel-react-best-practices",
3
3
  "version": "1.0.0",
4
- "generated": "2026-07-18T13:27:53.830Z",
4
+ "generated": "2026-07-19T18:29:56.208Z",
5
5
  "files": [
6
6
  "AGENTS.md",
7
7
  "README.md",