@mthanh/vespercli 1.6.0 → 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 +18 -1
- package/assets/CATALOG.md +13 -1
- package/assets/claude/agents/feature-wrap-document.md +32 -10
- 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 +1 -0
- package/assets/claude/skills/agent-fundamentals/references/codebase-query.md +4 -0
- package/assets/claude/skills/vesper-catalog-editing-safety/SKILL.md +141 -0
- package/assets/claude/vesper-orchestrator.md +8 -0
- package/assets/core/agents/feature-wrap-document.agent.md +18 -1
- package/assets/core/agents/history-logger.agent.md +22 -0
- package/assets/core/agents/vesper.agent.md +3 -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 +1 -0
- package/assets/core/skills/agent-fundamentals/references/codebase-query.md +4 -0
- package/assets/manifest.json +2 -1
- 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/manifest.json +1 -1
- 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 +1 -1
- package/assets/skills/problem-solving/manifest.json +1 -1
- package/assets/skills/react-mui-tanstack/manifest.json +1 -1
- 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 +1 -1
- package/assets/skills/vercel-react-best-practices/manifest.json +1 -1
- 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 +1 -1
- package/assets/skills/web-design-guidelines/manifest.json +1 -1
- package/assets/skills/web-frameworks/manifest.json +1 -1
- package/dist/cli.min.js +20 -20
- package/package.json +1 -1
- 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
package/README.md
CHANGED
|
@@ -142,11 +142,13 @@ Claude Code has no equivalent of VS Code's `chat.agentFilesLocations` setting, s
|
|
|
142
142
|
- `CLAUDE.md` — a small guarded `@import` block pointing at the three files below (never touches the rest of your `CLAUDE.md`)
|
|
143
143
|
- `.claude/vesper/orchestrator.md` — the orchestration playbook (routing rules, delegation), refreshed on every `init`/`update`
|
|
144
144
|
- `.claude/vesper/orchestration.md` — this project's Team Roster + Task Management config
|
|
145
|
-
- `.claude/vesper/context.md` — this project's architecture/stack/conventions
|
|
145
|
+
- `.claude/vesper/context.md` — this project's architecture/stack/conventions, as a slim, freshness-stamped core (≤200 lines, auto-injected into every session); a fuller **on-demand** tier under `.claude/vesper/context/` (conventions, integrations, technical debt, a bounded Recent-Decisions ring buffer) fills in as the Vesper agent learns the workspace, and is read only when an agent needs that detail
|
|
146
146
|
- `.mcp.json` and `.claude/settings.json` — the `vesper-indexing` MCP server + its tool permissions
|
|
147
147
|
|
|
148
148
|
No editor dependency — these files are read by the Claude Code engine itself, so the same install works from the terminal CLI, VS Code extension, JetBrains, or the desktop app. During install you're asked once whether to prefix catalog names with `vesper-` to avoid collisions with other Claude Code kits.
|
|
149
149
|
|
|
150
|
+
Two slash commands manage that on-demand knowledge over time: `/compact-knowledge` (size-triggered — archives old history/tracking artifacts and trims the memory graph, non-destructively) and `/revalidate-knowledge` (staleness-triggered — re-scans the codebase, re-validates archived and core knowledge against it, and rebalances the slim-core/on-demand split); Vesper only ever suggests these, never auto-runs them.
|
|
151
|
+
|
|
150
152
|
A single project can have both targets installed at once — `.vesper/` (code index, story tracking, `history.md`) is shared and cross-client by design, so a story researched under Copilot can be implemented under Claude Code, or vice versa.
|
|
151
153
|
|
|
152
154
|
</details>
|
|
@@ -256,6 +258,21 @@ vespercli reset --full # Remove EVERYTHING including vesper.agent.md
|
|
|
256
258
|
|
|
257
259
|
</details>
|
|
258
260
|
|
|
261
|
+
<details>
|
|
262
|
+
<summary><b><code>vespercli worktree</code></b> — bootstrap a worktree's local-only artifacts</summary>
|
|
263
|
+
|
|
264
|
+
Bootstrap a git worktree (or the current workspace) with Vesper's **local-only** artifacts — files that are intentionally gitignored (`.mcp.json`, the code index `.vesper/index.db`, the gitignore guard block, the managed git hooks and `.gitattributes` merge strategy) and therefore don't come along with a plain `git worktree add`. Idempotent and safe to re-run; it already runs automatically via the Claude `SessionStart` hook, the VS Code folder-open task, and a `post-checkout` git hook, so you rarely need to invoke it by hand. No-op on a workspace that was never vesperized.
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
vespercli worktree bootstrap # Regenerate local-only files in this worktree
|
|
268
|
+
vespercli worktree bootstrap --quiet # Suppress non-error output (used by the hooks above)
|
|
269
|
+
vespercli worktree bootstrap --path /my/project
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Bootstrap also refreshes the base branch's remote-tracking ref before rebuilding anything else: it resolves the base branch from `origin/HEAD` (e.g. `origin/master`) and runs a bounded (15s) `git fetch` — never `git pull`, so your checked-out branch and working tree are never touched. This keeps anything orienting against "what's on the base branch" (like a fresh worktree) looking at a recent `origin/<base>` instead of a possibly stale local checkout. It never fails the bootstrap: offline, no configured remote, or an unreachable/auth-expired remote all just log a warning (printed even under `--quiet`) and continue with the existing local refs.
|
|
273
|
+
|
|
274
|
+
</details>
|
|
275
|
+
|
|
259
276
|
<details>
|
|
260
277
|
<summary><b><code>vespercli mcp</code></b> — manage MCP servers</summary>
|
|
261
278
|
|
package/assets/CATALOG.md
CHANGED
|
@@ -409,6 +409,12 @@ Core skills provide fundamental capabilities and are installed by default alongs
|
|
|
409
409
|
- Description: Build accessible UIs with shadcn/ui (Radix UI) + Tailwind CSS — components, theming, dark mode, responsive layouts.
|
|
410
410
|
- Pick when: Project uses Tailwind + shadcn/ui; need accessible component patterns (dialogs, forms, tables); want consistent theming and responsive styling.
|
|
411
411
|
|
|
412
|
+
### vesper-catalog-editing-safety
|
|
413
|
+
|
|
414
|
+
- Path: `skills/vesper-catalog-editing-safety/`
|
|
415
|
+
- Description: Pre-edit safety checklist for touching Vesper's own asset catalog and provisioning code (`assets/`, `scripts/generate-claude-assets.js`, `src/cli/utils/settings.js`, `src/cli/utils/claude-target.js`).
|
|
416
|
+
- Pick when: Editing any catalog asset (agent/skill/prompt/instruction), the Claude-asset generator, or Copilot/Claude settings-injection code in this repo; need to know the dual asset tree boundary, discovery wiring, or the git-hygiene dual list before making the change.
|
|
417
|
+
|
|
412
418
|
### web-design-guidelines
|
|
413
419
|
|
|
414
420
|
- Path: `skills/web-design-guidelines/`
|
|
@@ -555,9 +561,15 @@ Core instructions are part of Vesper's orchestration workflows.
|
|
|
555
561
|
- Description: Generate a comprehensive repository summary and narrative story from commit history.
|
|
556
562
|
- Pick when: Want a "what happened" narrative for onboarding or review; need a summary of evolution and major decisions; preparing documentation or a project retrospective.
|
|
557
563
|
|
|
564
|
+
### revalidate-knowledge
|
|
565
|
+
|
|
566
|
+
- Path: `core/prompts/revalidate-knowledge.prompt.md`
|
|
567
|
+
- 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`'s trim/dedupe.
|
|
568
|
+
- Pick when: The project context feels stale or drifted from the code (staleness signal, not size); want archived knowledge (prioritizing `.unwrapped` entries) re-checked and re-extracted; need the slim core and on-demand context tiers rebalanced. User-invoked only — Vesper suggests it, never auto-runs it.
|
|
569
|
+
|
|
558
570
|
---
|
|
559
571
|
|
|
560
572
|
## Catalog Metadata
|
|
561
573
|
|
|
562
574
|
- **Version**: 1.4.0
|
|
563
|
-
- **Last Updated**: 2026-
|
|
575
|
+
- **Last Updated**: 2026-07-21
|
|
@@ -108,7 +108,7 @@ START: Is this a RULE about how to write/modify code in THIS project?
|
|
|
108
108
|
├─ YES → Is the rule scoped to a specific set of files (a path/glob)?
|
|
109
109
|
│ │ TIE-BREAKER: a glob that effectively matches all files (e.g. `**/*`, `**`,
|
|
110
110
|
│ │ `*`) is NOT file-scoped — it is semantically project-wide. Treat it as the
|
|
111
|
-
│ │ NO branch (→ context
|
|
111
|
+
│ │ NO branch (→ context tier / rules), never as a Skill with an always-firing
|
|
112
112
|
│ │ "matching: **/*" description.
|
|
113
113
|
│ ├─ YES (a real, bounded glob) → INSTRUCTION (file-glob-scoped) → SKILL
|
|
114
114
|
│ │ └─ delegate to `skill-creator` to create/update `.claude/skills/{domain}/SKILL.md`,
|
|
@@ -116,9 +116,13 @@ START: Is this a RULE about how to write/modify code in THIS project?
|
|
|
116
116
|
│ │ "Use when working with files matching: <glob>."
|
|
117
117
|
│ │ (mirrors the build-time convertInstructionToSkill() convention — not a new format)
|
|
118
118
|
│ └─ NO (project-wide / not file-scoped) → PROJECT CONTEXT UPDATE
|
|
119
|
-
│
|
|
120
|
-
│
|
|
121
|
-
│
|
|
119
|
+
│ (on-demand tier by default — keep the auto-injected slim core small)
|
|
120
|
+
│ ├─ Coding rule / convention → `.claude/vesper/context/conventions.md`
|
|
121
|
+
│ ├─ External dep / integration / dev-standard / CI detail → `.claude/vesper/context/integrations.md`
|
|
122
|
+
│ ├─ Known debt / ambiguity → `.claude/vesper/context/technical-debt.md`
|
|
123
|
+
│ ├─ Structural only (Big Picture Architecture / Domain Model / Critical Workflows) →
|
|
124
|
+
│ │ `.claude/vesper/context.md` core (then bump its `Last incremental update` stamp)
|
|
125
|
+
│ └─ Long/verbose but always-on (too big to inline cleanly in a context file) →
|
|
122
126
|
│ create a standalone `.claude/rules/{name}.md` and append
|
|
123
127
|
│ `@.claude/rules/{name}.md` to CLAUDE.md OUTSIDE the vesper:start/vesper:end
|
|
124
128
|
│ guard markers (survives update/reinit — see ensureClaudeMdGuardBlock).
|
|
@@ -127,8 +131,8 @@ START: Is this a RULE about how to write/modify code in THIS project?
|
|
|
127
131
|
│ if absent, so re-running a retrospective for an updated same-named rule
|
|
128
132
|
│ overwrites `.claude/rules/{name}.md` without appending a duplicate import.
|
|
129
133
|
│ HEURISTIC (B-vs-C): more than ~20-30 lines, or it carries its own
|
|
130
|
-
│ examples / sub-structure → standalone rules file; otherwise
|
|
131
|
-
│
|
|
134
|
+
│ examples / sub-structure → standalone rules file; otherwise route to the
|
|
135
|
+
│ on-demand tier / core above. Misfiling here is low-stakes and self-correcting.
|
|
132
136
|
│
|
|
133
137
|
├─ NO → Is this a REPEATABLE WORKFLOW with multiple steps?
|
|
134
138
|
├─ YES → SKILL
|
|
@@ -153,6 +157,8 @@ START: Is this a RULE about how to write/modify code in THIS project?
|
|
|
153
157
|
|
|
154
158
|
You MUST present ALL proposed updates as a numbered summary, then wait for user to approve by number (partial approval supported).
|
|
155
159
|
|
|
160
|
+
**Scope of this approval gate (important):** this numbered-approval workflow applies ONLY to genuinely **structural** `.claude/vesper/context.md` edits — the slim core's Big Picture Architecture / Domain Model / Critical Workflows, and the on-demand tier's Conventions / Integrations / Technical Debt files. 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.
|
|
161
|
+
|
|
156
162
|
### Step 1: Analyze and Generate All Proposals
|
|
157
163
|
|
|
158
164
|
You WILL:
|
|
@@ -298,7 +304,9 @@ You WILL after all approved updates are applied:
|
|
|
298
304
|
|
|
299
305
|
## Knowledge Type Guidelines
|
|
300
306
|
|
|
301
|
-
### Project Context (
|
|
307
|
+
### Project Context (two-tier: slim core + on-demand tier)
|
|
308
|
+
|
|
309
|
+
**Target routing (avoid slim-core creep):** durable prose lands in the on-demand tier, NOT the auto-injected core. A coding rule/convention → `.claude/vesper/context/conventions.md`; an external dep / integration / dev-standard / CI detail → `.claude/vesper/context/integrations.md`; a known debt/ambiguity → `.claude/vesper/context/technical-debt.md`. Only genuinely **structural** content (Big Picture Architecture / Domain Model / Critical Workflows) belongs in the injected `.claude/vesper/context.md` core — and any such gated structural edit also bumps the core's `Last incremental update` freshness stamp. `recent-decisions.md` is `history-logger`'s ring buffer, never written here.
|
|
302
310
|
|
|
303
311
|
**Characteristics:**
|
|
304
312
|
|
|
@@ -454,8 +462,8 @@ description: [What it does + when to use it]
|
|
|
454
462
|
|
|
455
463
|
- **Pattern**: Phased implementation with typed placeholders
|
|
456
464
|
- **Problem solved**: Blocked progress due to complex feature dependency
|
|
457
|
-
- **Knowledge type**: Project context
|
|
458
|
-
- **Target**: `.claude/vesper/context.md`
|
|
465
|
+
- **Knowledge type**: Project context (coding convention)
|
|
466
|
+
- **Target**: `.claude/vesper/context/conventions.md` (on-demand tier — a coding convention, not slim-core structural content)
|
|
459
467
|
|
|
460
468
|
**Proposal:**
|
|
461
469
|
|
|
@@ -611,13 +619,15 @@ You WILL respond to these user commands:
|
|
|
611
619
|
- **READ**: Use `Read`/`Grep`/`Glob` across entire workspace for analysis
|
|
612
620
|
- **WRITE**: Modify files ONLY after explicit user approval by number
|
|
613
621
|
- **ALLOWED WRITES**:
|
|
614
|
-
- `.claude/vesper/context.md`
|
|
622
|
+
- `.claude/vesper/context.md` — structural slim-core only (Big Picture Architecture / Domain Model / Critical Workflows / Freshness); bump `Last incremental update` on a gated structural edit
|
|
623
|
+
- `.claude/vesper/context/conventions.md`, `.claude/vesper/context/integrations.md`, `.claude/vesper/context/technical-debt.md` — on-demand tier (default home for durable Conventions / Integrations / Technical Debt)
|
|
615
624
|
- `.claude/skills/**/SKILL.md` (project-local skills only — delegate to `skill-creator` for these, and for anything meant to join the shared global catalog)
|
|
616
625
|
- `.claude/rules/{name}.md` (decision-tree Branch C — standalone always-on rule files; create/overwrite the rule file itself here)
|
|
617
626
|
- `CLAUDE.md` — **narrow carve-out, Branch C only**: you MAY append a single `@.claude/rules/{name}.md` import line, and ONLY that. It MUST go **outside** the `<!-- vesper:start -->…<!-- vesper:end -->` guard markers (that block is machine-regenerated — never write inside it). Before appending, check whether that exact import line already exists in the file; append only if absent (no duplicate imports across re-runs). No other edit to `CLAUDE.md` is permitted.
|
|
618
627
|
- `docs/*.md`
|
|
619
628
|
- `README.md`
|
|
620
629
|
- **FORBIDDEN WRITES**:
|
|
630
|
+
- `.claude/vesper/context/recent-decisions.md` — `history-logger`'s ring buffer, never written here
|
|
621
631
|
- Source code files (unless explicitly requested)
|
|
622
632
|
- Configuration files — **except** the single narrow `CLAUDE.md` `@import`-append carve-out defined under ALLOWED WRITES above
|
|
623
633
|
- Planning/tracking files (`.vesper/.tracking/*`)
|
|
@@ -665,3 +675,15 @@ A **separate, explicitly-invoked mode**, distinct from your normal per-task memo
|
|
|
665
675
|
5. Report: entity count before/after, and a short list of what was merged.
|
|
666
676
|
|
|
667
677
|
**Never** perform this compaction as a side effect of a normal feature-wrap invocation — only when explicitly asked for compaction.
|
|
678
|
+
|
|
679
|
+
## 🔁 Knowledge Revalidation Mode (`/revalidate-knowledge` only — never the default behavior)
|
|
680
|
+
|
|
681
|
+
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.
|
|
682
|
+
|
|
683
|
+
1. `read_graph()` (or `search_nodes` broadly) to see the full set of entities.
|
|
684
|
+
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.
|
|
685
|
+
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.
|
|
686
|
+
4. Merge/dedupe as in Compaction Mode where entities are now redundant post-revalidation. Never touch `current_task` or anything with an active relation.
|
|
687
|
+
5. Report: entities revalidated, corrected, superseded, and re-extracted from flagged archives.
|
|
688
|
+
|
|
689
|
+
**Never** perform revalidation as a side effect of a normal feature-wrap invocation — only when explicitly asked via `/revalidate-knowledge`.
|
|
@@ -36,6 +36,19 @@ You must STRICTLY follow this format for every entry:
|
|
|
36
36
|
|
|
37
37
|
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 using `Edit`.
|
|
38
38
|
|
|
39
|
+
### 4. Recent-Decisions Ring Buffer (Implementation completions only)
|
|
40
|
+
|
|
41
|
+
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.
|
|
42
|
+
|
|
43
|
+
On every such append:
|
|
44
|
+
|
|
45
|
+
1. Read `.claude/vesper/context/recent-decisions.md` (create it with a `# Recent Decisions` header if missing).
|
|
46
|
+
2. Append the new entry as **one line**: `- YYYY-MM-DD [slug] — <one-sentence summary of what shipped>` (date via `Bash` `date`, consistent with the `history.md` append; `slug` is the story/task slug).
|
|
47
|
+
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.
|
|
48
|
+
4. Rewrite `recent-decisions.md` so it holds only the newest 10 entries (plus its header).
|
|
49
|
+
|
|
50
|
+
**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.
|
|
51
|
+
|
|
39
52
|
## Examples
|
|
40
53
|
|
|
41
54
|
**Input:** "Log that Initialization Phase 2a started."
|
|
@@ -73,6 +86,15 @@ This is a **separate, explicitly-invoked mode** — distinct from your normal ap
|
|
|
73
86
|
2. Never touch `refining/`, `backlog/`, `inprogress/`, or `inreview/` — only `completed/`.
|
|
74
87
|
3. Report the count moved and where.
|
|
75
88
|
|
|
89
|
+
### 3. Archive correlated tracking artifacts
|
|
90
|
+
|
|
91
|
+
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 `Bash mv`, never delete.
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
2. **Archive-with-a-flag fallback**: archive regardless of whether `feature-wrap-document` 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).
|
|
95
|
+
3. **Ordering**: prefer to run after feature-wrap extraction for the slug, but never block indefinitely — the `.unwrapped` flag is the fallback.
|
|
96
|
+
4. Report which slugs were archived and which were flagged `.unwrapped`.
|
|
97
|
+
|
|
76
98
|
### Constraints (Compaction Mode only)
|
|
77
99
|
|
|
78
100
|
- **Never delete** — every rotation/archive is a move, not a removal.
|
|
@@ -125,32 +125,52 @@ If `EXISTING_CONTENT` is not empty, apply this merge strategy:
|
|
|
125
125
|
**Step 3c — Write/Edit the file:**
|
|
126
126
|
Use `Edit`/`Write` to generate or update `.claude/vesper/context.md`.
|
|
127
127
|
|
|
128
|
-
**This file is the single project-context document that helps every Vesper subagent code effectively in this project.**
|
|
128
|
+
**This file is the single always-injected project-context document that helps every Vesper subagent code effectively in this project.** It is auto-injected into EVERY session via root `CLAUDE.md`, so 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-imported and are read only when an agent needs that detail.
|
|
129
129
|
|
|
130
|
-
**
|
|
130
|
+
**Slim-core `context.md` — the ONLY sections that belong in the always-injected core:**
|
|
131
131
|
|
|
132
|
-
1. **
|
|
133
|
-
2. **
|
|
134
|
-
3. **
|
|
135
|
-
4. **
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
1. **Freshness header** (see format below) — placed immediately after the H1 title.
|
|
133
|
+
2. **Big Picture Architecture**: Major components, service boundaries, data flows, and the "why" behind decisions.
|
|
134
|
+
3. **Domain Model**: Core business concepts, naming conventions, key user flows — the "what this project does."
|
|
135
|
+
4. **Critical Workflows**: Build, test, and debug commands not obvious from file inspection.
|
|
136
|
+
|
|
137
|
+
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\``:
|
|
138
|
+
|
|
139
|
+
- `.claude/vesper/context/conventions.md` — project-specific patterns that differ from common practice (was "Conventions").
|
|
140
|
+
- `.claude/vesper/context/integrations.md` — external dependencies, cross-component communication, Development Standards / Verification & CI/CD detail.
|
|
141
|
+
- `.claude/vesper/context/technical-debt.md` — known debt / ambiguities.
|
|
142
|
+
- `.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.
|
|
143
|
+
|
|
144
|
+
**Do NOT add any `.claude/vesper/context/*.md` file to the `CLAUDE.md` guard block** — the guard block imports only `orchestrator.md`, `orchestration.md`, and the slim core `context.md`. The on-demand files are pull, not push.
|
|
145
|
+
|
|
146
|
+
**Freshness header format** (Decision 3 — HTML-comment-free, machine-parseable; place it directly under the H1):
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
## Freshness
|
|
150
|
+
|
|
151
|
+
- **Last full re-scan**: YYYY-MM-DD (commit `<7-hex-sha>`)
|
|
152
|
+
- **Last incremental update**: YYYY-MM-DD
|
|
153
|
+
- **Last revalidation**: YYYY-MM-DD
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
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` (e.g. `- **Last revalidation**: never`). **On a full regen (this Phase / `/reinit`)** you set `Last full re-scan` to today plus the current commit short-sha (get it via `git rev-parse --short HEAD`) AND reset `Last incremental update` to today. `Last revalidation` is only ever set by the `/revalidate-knowledge` flow — leave it untouched on a full regen (preserve its existing value, or `never` if absent).
|
|
139
157
|
|
|
140
158
|
**This file must NOT contain** (these go in `.claude/vesper/orchestration.md`):
|
|
141
159
|
|
|
142
160
|
- Team Roster tables
|
|
143
161
|
- Task Management configuration
|
|
144
162
|
|
|
163
|
+
**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.
|
|
164
|
+
|
|
145
165
|
**Guidelines:**
|
|
146
166
|
|
|
147
|
-
- **
|
|
167
|
+
- **Slim and scannable**: the core is a hard ≤ 200-line budget (see enforcement below). Push depth into the on-demand tier, not the core.
|
|
148
168
|
- **Specific Examples**: Reference key files/directories or include code snippets to exemplify patterns.
|
|
149
169
|
- **No Fluff**: Avoid generic advice ("write tests", "handle errors"). Focus on THIS project's specific approaches.
|
|
150
170
|
- **Reality Check**: Document only discoverable patterns, not aspirational practices.
|
|
151
171
|
|
|
152
|
-
**Step 3d — Verify:**
|
|
153
|
-
After editing, use `Read` to confirm `.claude/vesper/context.md` exists,
|
|
172
|
+
**Step 3d — Verify (line-budget enforcement, Decision 4):**
|
|
173
|
+
After editing, run `wc -l .claude/vesper/context.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 extracted section with its one-line pointer, then re-run `wc -l` and repeat until the core is ≤ 200 lines. Then use `Read` to confirm `.claude/vesper/context.md` exists, carries the Freshness header, contains only the core sections + one-line pointers, and does NOT contain a Team Roster or Task Management section. Confirm each on-demand file referenced by a pointer actually exists.
|
|
154
174
|
|
|
155
175
|
##### File 2: `.claude/vesper/orchestration.md`
|
|
156
176
|
|
|
@@ -397,3 +417,16 @@ When invoked with a **roster review** request (via the `/revalidate-team` slash
|
|
|
397
417
|
|
|
398
418
|
7. Report the proposal to the user for confirmation before applying.
|
|
399
419
|
8. Once confirmed, run Phase 4 Steps 3-6 (install + verify installation + update roster + verify roster against catalog) scoped to only the approved changes.
|
|
420
|
+
|
|
421
|
+
## 🔁 Knowledge Revalidation Mode (`/revalidate-knowledge` only)
|
|
422
|
+
|
|
423
|
+
A separate, user-invoked mode (Vesper suggests it on staleness/drift, never auto-runs it). You own the whitepaper/archive side; `feature-wrap-document` runs the memory-graph side in parallel. Your job: **rescan → revalidate → re-balance**.
|
|
424
|
+
|
|
425
|
+
### Steps
|
|
426
|
+
|
|
427
|
+
1. **Reindex first**: call `mcp__vesper-indexing__vesper_reindex` with `{ "full": true }` (your standard mandatory reindex-first workflow) so revalidation runs against the current code.
|
|
428
|
+
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.
|
|
429
|
+
3. **Re-balance the core/on-demand split** — re-derive the slim core (`.claude/vesper/context.md`: Freshness header + Big Picture Architecture + Domain Model + Critical Workflows only) and the on-demand tier, re-running the ≤ 200-line `wc -l` budget check and extracting any overflow (Decision 4 order: Conventions → Integrations → Technical Debt → Recent Decisions).
|
|
430
|
+
4. **Re-validate Technical Debt** — drop bullets the current code has resolved; keep/append only what still holds.
|
|
431
|
+
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.
|
|
432
|
+
6. Report what was revalidated, corrected, dropped, re-extracted (especially from `.unwrapped` archives), and re-balanced.
|
|
@@ -4,7 +4,7 @@ description: Compact persisted Vesper knowledge (history.md, memory.jsonl, compl
|
|
|
4
4
|
|
|
5
5
|
Compact persisted Vesper knowledge. Delegate in parallel:
|
|
6
6
|
|
|
7
|
-
1. `history-logger` in Compaction Mode: rotate `.vesper/history.md` (archive entries older than the last 30 into `.vesper/history-archive/YYYYMM.md`)
|
|
7
|
+
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).
|
|
8
8
|
2. `feature-wrap-document` in Memory Compaction Mode: merge/dedupe stale entities in the MCP memory graph, never touching `current_task` or active entities.
|
|
9
9
|
|
|
10
10
|
Report what was archived/merged from both. Nothing is deleted — only moved to archive files or consolidated within the memory graph.
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
Re-establish the truth of the project whitepaper. Unlike `/compact-knowledge` (triggered on *size*, 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.
|
|
6
|
+
|
|
7
|
+
Delegate in parallel:
|
|
8
|
+
|
|
9
|
+
1. `workspace-learner` (inherits its mandatory reindex-first workflow):
|
|
10
|
+
- **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.
|
|
11
|
+
- **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.
|
|
12
|
+
- **Re-validate Technical Debt** — drop bullets the current code has resolved; keep/append only what still holds.
|
|
13
|
+
- On completion, set the `Last revalidation` stamp in the core Freshness header to today's date (per the freshness parse contract).
|
|
14
|
+
|
|
15
|
+
2. `feature-wrap-document` (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.
|
|
16
|
+
|
|
17
|
+
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.
|
|
@@ -1,33 +1,57 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: '
|
|
2
|
+
description: 'Slim project-context core (architecture, domain, workflows, freshness). Maintained by workspace-learner. Auto-injected into every session — detail lives in the on-demand .claude/vesper/context/ tier.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Project Context
|
|
6
6
|
|
|
7
7
|
<!--
|
|
8
8
|
Populated by workspace-learner during setup / re-init, from a full codebase scan
|
|
9
|
-
(vesper-indexing MCP tools + targeted reads of root config files).
|
|
9
|
+
(vesper-indexing MCP tools + targeted reads of root config files).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
TWO-TIER SHAPE — this file is auto-injected into EVERY session via root CLAUDE.md, so it is a
|
|
12
|
+
bounded, freshness-stamped SLIM CORE (hard budget: <= 200 lines). Everything else lives in an
|
|
13
|
+
ON-DEMAND tier under .claude/vesper/context/*.md (NOT auto-imported by CLAUDE.md; read only when
|
|
14
|
+
an agent needs that detail), each referenced from the core by a one-line pointer.
|
|
15
|
+
|
|
16
|
+
Core sections, in order (the ONLY sections that belong in this file):
|
|
17
|
+
|
|
18
|
+
1. Freshness header (see below) — immediately after the H1 title.
|
|
19
|
+
2. Big Picture Architecture — major components, service boundaries, data flows, and the "why"
|
|
12
20
|
behind decisions.
|
|
13
|
-
|
|
14
|
-
tools — the "how we write code here."
|
|
15
|
-
3. Verification & CI/CD — test framework, coverage expectations, CI pipeline, how to run/debug
|
|
16
|
-
tests locally.
|
|
17
|
-
4. Domain Model — core business concepts, naming conventions, key user flows — the "what this
|
|
21
|
+
3. Domain Model — core business concepts, naming conventions, key user flows — the "what this
|
|
18
22
|
project does."
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
4. Critical Workflows — build, test, and debug commands not obvious from file inspection.
|
|
24
|
+
|
|
25
|
+
Freshness header (HTML-comment-free, machine-parseable; place directly under the H1):
|
|
26
|
+
|
|
27
|
+
## Freshness
|
|
28
|
+
|
|
29
|
+
- **Last full re-scan**: YYYY-MM-DD (commit `<7-hex-sha>`)
|
|
30
|
+
- **Last incremental update**: YYYY-MM-DD
|
|
31
|
+
- **Last revalidation**: YYYY-MM-DD
|
|
32
|
+
|
|
33
|
+
Parse contract: each stamp is its own bullet `- **Label**: DATE` (ISO YYYY-MM-DD); the re-scan
|
|
34
|
+
bullet also carries `(commit `<7-hex>`)`. A stamp that never occurred takes the literal `never`.
|
|
35
|
+
Full regen sets Last full re-scan (+ commit) and resets Last incremental update; Last revalidation
|
|
36
|
+
is set only by /revalidate-knowledge.
|
|
37
|
+
|
|
38
|
+
On-demand tier (create as separate files, reference each by a one-line pointer from the core, e.g.
|
|
39
|
+
`> Detail: see `.claude/vesper/context/conventions.md``):
|
|
40
|
+
|
|
41
|
+
- .claude/vesper/context/conventions.md — project-specific patterns that differ from common practice.
|
|
42
|
+
- .claude/vesper/context/integrations.md — external deps, cross-component comms, dev standards / CI.
|
|
43
|
+
- .claude/vesper/context/technical-debt.md — known debt / ambiguities (re-validated on regen, not append-only).
|
|
44
|
+
- .claude/vesper/context/recent-decisions.md — bounded (N=10) Recent-Decisions ring buffer (history-logger).
|
|
22
45
|
|
|
23
46
|
Guidelines:
|
|
24
|
-
-
|
|
47
|
+
- Slim and scannable: push depth into the on-demand tier, not the core; verify with `wc -l` <= 200.
|
|
25
48
|
- Specific examples: reference key files/directories or include code snippets.
|
|
26
49
|
- No fluff: avoid generic advice ("write tests", "handle errors") — focus on THIS project.
|
|
27
50
|
- Reality check: document only discoverable patterns, not aspirational practices.
|
|
28
51
|
|
|
29
52
|
Seeding: if a similar project-context document already exists from a prior setup, seed this
|
|
30
53
|
file from it instead of re-scanning from zero — only run the full 4-perspective scan if no
|
|
31
|
-
such document exists yet. Only pull architecture/
|
|
32
|
-
|
|
54
|
+
such document exists yet. Only pull architecture/domain/workflow content into the core (extract
|
|
55
|
+
conventions/integrations/tech-debt into the on-demand tier) — never routing/roster mechanics,
|
|
56
|
+
those live in orchestration.md instead.
|
|
33
57
|
-->
|
|
@@ -21,6 +21,7 @@ Universal operating rules for every subagent in the Vesper ecosystem. These are
|
|
|
21
21
|
- Results include actual source code — skip `Read` 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`, `Glob` 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 subagents should explore and understand any codebase.
|
|
|
11
11
|
4. Bash (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`, `Read`, 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
|
### mcp__vesper-indexing__vesper_search
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vesper-catalog-editing-safety
|
|
3
|
+
description: Pre-edit safety checklist for touching Vesper's own asset catalog and provisioning code — assets/, scripts/generate-claude-assets.js, src/cli/utils/settings.js, src/cli/utils/claude-target.js. Use before editing any catalog asset (agent, skill, prompt, instruction), the Claude-asset generator, or the Copilot/Claude settings-injection code in this repo. Prevents re-deriving the dual-target distribution model from scratch and catches the generator-boundary and git-hygiene-dual-list traps that have already caused a blocking architecture-review finding and a shipped bug.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vesper Catalog Editing Safety
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This repo (`@mthanh/vespercli`) is self-hosting: it produces the very agent/skill/prompt catalog it installs into itself and every other project. That self-hosting creates footguns that are easy to rediscover the hard way — one already caused a blocking architecture-review finding, another shipped as a real bug. This skill is a **pre-flight checklist**, not the narrative — walk it before touching provisioning code or catalog assets, and follow the links when you need the full story.
|
|
11
|
+
|
|
12
|
+
Full narrative + citations: [`docs/architecture.md`](../../../docs/architecture.md). Terse always-loaded version: `.claude/vesper/context.md`'s Conventions section. Read this skill first — it tells you *which* parts of those two documents matter for the edit in front of you.
|
|
13
|
+
|
|
14
|
+
## When to Use This Skill
|
|
15
|
+
|
|
16
|
+
Load this skill before:
|
|
17
|
+
|
|
18
|
+
- Editing anything under `assets/` — core, extended, or the generated `assets/claude/` tree
|
|
19
|
+
- Editing `scripts/generate-claude-assets.js`
|
|
20
|
+
- Editing `src/cli/utils/settings.js` or `src/cli/utils/claude-target.js`
|
|
21
|
+
- Planning or reviewing a change that touches how Copilot or Claude Code *discovers* a Vesper asset (settings arrays, plugin install, guard blocks, reinject hooks)
|
|
22
|
+
- Editing `.claude/rules/*.md`, `.vesper/instructions/`, or `.vesper/skills/` override paths
|
|
23
|
+
- Editing `VESPER_GIT_PATHS` (`settings.js`) or `assets/hooks/pre-commit`
|
|
24
|
+
- Reviewing a plan/PR that proposes any of the above — this is a research **and** review-time checklist, not just an implementation-time one
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
### Step 1 — Route the edit to the right trap
|
|
29
|
+
|
|
30
|
+
| You're touching... | Go to |
|
|
31
|
+
| ----------------------------------------------------------------------- | ------------ |
|
|
32
|
+
| A file under `assets/agents/`, `assets/skills/`, `assets/instructions/`, `assets/prompts/`, or `assets/claude/*` | Checklist A — Dual Asset Tree |
|
|
33
|
+
| `scripts/generate-claude-assets.js` itself | Checklist A |
|
|
34
|
+
| `.vesper/instructions/`, `.vesper/skills/`, or a new `.claude/rules/*.md` | Checklist B — Discovery Wiring |
|
|
35
|
+
| `getCoreAssetEntries()` or `VSCODE_SETTINGS_MAP` in `settings.js` | Checklist B |
|
|
36
|
+
| `ensureClaudeMdGuardBlock()` or `VESPER_REINJECT_COMMAND` in `claude-target.js` | Checklist B |
|
|
37
|
+
| `VESPER_GIT_PATHS` in `settings.js`, or `assets/hooks/pre-commit` | Checklist C — Git-Hygiene Dual List |
|
|
38
|
+
| Anything about which target (Copilot vs Claude) gets what | Checklist D — Distribution Model (background only) |
|
|
39
|
+
|
|
40
|
+
Most edits hit exactly one checklist. If unsure, read Checklist D first — it's the model everything else sits on.
|
|
41
|
+
|
|
42
|
+
### Checklist A — Dual Asset Tree (the highest-value trap)
|
|
43
|
+
|
|
44
|
+
`scripts/generate-claude-assets.js` has a narrow, explicit remit — verified against its own header comment (`scripts/generate-claude-assets.js:11-14`):
|
|
45
|
+
|
|
46
|
+
| Copilot source | Claude output |
|
|
47
|
+
| ------------------------------------------------------- | ----------------------------------------------------------- |
|
|
48
|
+
| `assets/agents/<name>/<name>.agent.md` | `assets/claude/agents/<name>.md` |
|
|
49
|
+
| `assets/prompts/<name>/<name>.prompt.md` | `assets/claude/commands/<name>.md` |
|
|
50
|
+
| `assets/skills/<name>/` | `assets/claude/skills/<name>/` (near-verbatim) |
|
|
51
|
+
| `assets/instructions/<name>/<name>.instructions.md` | `assets/claude/skills/<name>/SKILL.md` (new skill) |
|
|
52
|
+
|
|
53
|
+
**That table is the entire remit.** `assets/core/` is never read by this script, at all — by design, not by omission (the script's own comment: *"the 12 core agents + the orchestrator playbook are hand-authored separately in assets/claude/ and are never touched by this script"*).
|
|
54
|
+
|
|
55
|
+
- [ ] Is the file under `assets/core/`?
|
|
56
|
+
- **Yes** → There is no generator step for you. Hand-edit **both** the Copilot source (`assets/core/{agents,skills,instructions,prompts}/...`) **and** its `assets/claude/` twin. Before editing the twin, check it for **Claude-only content that doesn't exist in the Copilot source** and preserve it — e.g. `assets/claude/skills/agent-fundamentals/SKILL.md`'s `## Direct Collaboration (Nested Delegation)` section has no Copilot-side counterpart. Never diff the two sides expecting them to match; they're allowed to diverge by design.
|
|
57
|
+
- **No** (it's under `assets/agents/`, `assets/skills/`, `assets/instructions/`, or `assets/prompts/`) → Edit the Copilot source only, then run `node scripts/generate-claude-assets.js` to regenerate its Claude twin. **Never hand-edit anything under `assets/claude/`** for a file that came from this table — your edit will be silently clobbered (or drift undetected) the next time the generator runs.
|
|
58
|
+
- [ ] If you're editing `assets/claude/` directly right now — stop and confirm which case above you're actually in. Hand-editing generated output is the single most common way this trap gets tripped.
|
|
59
|
+
- [ ] If your task is planning/reviewing (not implementing) a catalog change: confirm the plan doesn't assume a core-skill/core-agent edit will "just flow through" the generator step. It won't — this exact wrong assumption produced a blocking architecture-review finding (BC-2) and a near-miss self-contradiction in an agent's own file-write rules in a prior session.
|
|
60
|
+
|
|
61
|
+
### Checklist B — Local Overrides vs. Discovery Wiring (per target)
|
|
62
|
+
|
|
63
|
+
"A file exists at the right path" and "the target actually discovers it" are two different guarantees — satisfied differently per target.
|
|
64
|
+
|
|
65
|
+
**Copilot** — `.vesper/instructions/*.instructions.md` and `.vesper/skills/**/SKILL.md` are project-local override paths. They are **inert on their own**.
|
|
66
|
+
|
|
67
|
+
- [ ] Does `getCoreAssetEntries()` (`src/cli/utils/settings.js:1321-1363`, appending entries around lines 1348-1360) explicitly include a `${workspaceFolder}/.vesper/instructions` and `${workspaceFolder}/.vesper/skills` entry in the arrays it writes into `.vscode/settings.json` (keyed by `VSCODE_SETTINGS_MAP`, `settings.js:70-75`)? If you're adding a *new* override path convention, it needs the equivalent wiring here — a path convention alone is invisible to Copilot without a matching settings-array entry. This exact gap was found and fixed once already.
|
|
68
|
+
|
|
69
|
+
**Claude Code** — `.claude/skills/{domain}/SKILL.md` needs no wiring; it's natively auto-discovered. `.claude/rules/{name}.md` is different — it has two moving parts, neither of which is native Claude Code behavior:
|
|
70
|
+
|
|
71
|
+
- [ ] Does `CLAUDE.md` carry an `@.claude/rules/{name}.md` import line **outside** the `<!-- vesper:start -->...<!-- vesper:end -->` guard block? (`ensureClaudeMdGuardBlock()`, `src/cli/utils/claude-target.js:257`.) Inside the guard block, it gets regenerated away on the next `update`/`/reinit`.
|
|
72
|
+
- [ ] Does the rule still need to survive `/clear`? The `SessionStart(clear)` reinject hook (`VESPER_REINJECT_COMMAND`, `claude-target.js:723-753`) dynamically enumerates `.claude/rules/*.md` at hook-fire time — sorted, `.md`-filtered — alongside the three fixed `.claude/vesper/*.md` playbook files. You don't need to register a new rule file anywhere for this to work; a missing `.claude/rules/` directory is swallowed by an outer try/catch (no-op). But if you're changing the *enumeration logic itself*, verify it still globs correctly.
|
|
73
|
+
|
|
74
|
+
### Checklist C — Git-Hygiene Dual List (no single source of truth)
|
|
75
|
+
|
|
76
|
+
`VESPER_GIT_PATHS` (`src/cli/utils/settings.js:173-185`) and the `vesper_git_paths` shell string in `assets/hooks/pre-commit:16` describe the same set of "project knowledge that must ride along with any commit touching other work." They are **hand-mirrored**, not generated from one source.
|
|
77
|
+
|
|
78
|
+
- [ ] Edited one list? Edit the other too, in the **same relative order**. There is no codegen link between them (open technical debt) — nothing will catch a divergence for you.
|
|
79
|
+
- [ ] Every entry is **slash-less** (`.claude/skills`, never `.claude/skills/`). A trailing slash turns the pre-commit hook's match clause (`case "$candidate" in "$p"/*)`) into a pattern with a literal double slash that never matches a real staged path — silently defeating the guardrail for that one entry. This has already shipped as a real bug once.
|
|
80
|
+
|
|
81
|
+
### Checklist D — Distribution Model (background, read when the trap isn't obvious)
|
|
82
|
+
|
|
83
|
+
- **Copilot**: nothing is copied into the project. Vesper injects settings entries (`chat.agentFilesLocations` / `chat.instructionsFilesLocations` / `chat.promptFilesLocations` / `chat.agentSkillsLocations`, see `VSCODE_SETTINGS_MAP` at `settings.js:70-75`) into `.vscode/settings.json`, pointing at the installed npm package's `assets/` tree. `getCoreAssetEntries()` (`settings.js:1321-1363`) assembles the full entry list.
|
|
84
|
+
- **Claude Code**: the catalog is a **user-level plugin**, installed once and shared across every project on the machine — `~/.claude/skills/vesper/{agents,commands,skills}/`. `getClaudePluginDir()` (`claude-target.js:36-38`) resolves the path; `installClaudePluginCatalog()` (`claude-target.js:157-171`) performs the install/refresh. Only a small per-project set of files lives in the repo itself: `.claude/vesper/{orchestrator,orchestration,context}.md`, `.mcp.json`, `.claude/settings.json`.
|
|
85
|
+
- Both targets share one on-disk index at `.vesper/index.db`.
|
|
86
|
+
|
|
87
|
+
If your edit changes *where* either target looks, or *what* gets written into the project vs. the shared install location, this is the model to reason from before touching Checklist A/B.
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
|
|
91
|
+
### Example 1: Adding a brand-new skill to the extended catalog
|
|
92
|
+
|
|
93
|
+
**Input**: "Add a new skill `assets/skills/foo-bar/SKILL.md`."
|
|
94
|
+
|
|
95
|
+
**Process**:
|
|
96
|
+
1. Checklist A applies (extended tree, not `assets/core/`).
|
|
97
|
+
2. Write `assets/skills/foo-bar/SKILL.md` (+ any `references/`, `scripts/`, `assets/` subfolders) under the Copilot source tree only.
|
|
98
|
+
3. Do **not** hand-write anything under `assets/claude/skills/foo-bar/` — that's the generator's job.
|
|
99
|
+
4. Note in the handoff/PR that `node scripts/generate-claude-assets.js` must be run (by a maintainer or a later pipeline step with Bash access) before the skill exists on the Claude Code target.
|
|
100
|
+
|
|
101
|
+
### Example 2: Editing a core skill (`assets/core/skills/agent-fundamentals/`)
|
|
102
|
+
|
|
103
|
+
**Input**: "Add a new rule to `agent-fundamentals`'s Terminal Discipline table."
|
|
104
|
+
|
|
105
|
+
**Process**:
|
|
106
|
+
1. Checklist A applies, `assets/core/` branch — no generator step exists.
|
|
107
|
+
2. Edit `assets/core/skills/agent-fundamentals/SKILL.md` (Copilot source).
|
|
108
|
+
3. Before editing `assets/claude/skills/agent-fundamentals/SKILL.md`, re-read it fully — it already carries the Claude-only `## Direct Collaboration (Nested Delegation)` section that has no Copilot-side counterpart. Add the new rule to both files without disturbing that section.
|
|
109
|
+
|
|
110
|
+
### Example 3: Adding a `${workspaceFolder}`-relative override path for a new asset type
|
|
111
|
+
|
|
112
|
+
**Input**: "Support project-local overrides for prompts, the same way `.vesper/instructions` works today."
|
|
113
|
+
|
|
114
|
+
**Process**:
|
|
115
|
+
1. Checklist B applies (Copilot branch).
|
|
116
|
+
2. Confirm `getCoreAssetEntries()` in `settings.js` needs a new `${workspaceFolder}/.vesper/prompts`-style entry appended into the `chat.promptFilesLocations` array — the path convention alone will not make Copilot discover it.
|
|
117
|
+
3. Flag in the plan/review that this wiring step is required, not optional — it's the exact class of gap that was found and fixed once already in this repo.
|
|
118
|
+
|
|
119
|
+
## Edge Cases
|
|
120
|
+
|
|
121
|
+
**"I'm only touching `assets/claude/` to fix an obvious typo."** Still routes through Checklist A. If the source file is under the extended tree, fix the typo in the Copilot source and regenerate — don't patch the generated copy even for a one-character fix, or the next generator run silently reverts it.
|
|
122
|
+
|
|
123
|
+
**"The instruction/prompt/agent I'm adding doesn't map cleanly to the generator's table."** `assets/core/instructions/*.instructions.md` files are hand-folded into the orchestrator/rules constructs (Checklist B), not mechanically converted — there is no automatic instructions → Claude-skill path for core instructions the way there is for the extended tree.
|
|
124
|
+
|
|
125
|
+
**"I can't tell if a file is 'core' or 'extended.'"** Core = anything under `assets/core/`. Extended = `assets/agents/`, `assets/skills/`, `assets/instructions/`, `assets/prompts/` (no `core/` segment). If genuinely ambiguous, check whether an `assets/claude/` twin already exists and whether it looks hand-authored (has Claude-only sections) vs. mechanically generated (near-verbatim mirror) — that's a strong signal of which bucket it's in.
|
|
126
|
+
|
|
127
|
+
**"I don't have Bash tool access to run the generator."** Note it explicitly in your output/handoff rather than silently skipping it — the change is incomplete on the Claude Code target until a maintainer or a later pipeline step runs `node scripts/generate-claude-assets.js`.
|
|
128
|
+
|
|
129
|
+
## Related Files
|
|
130
|
+
|
|
131
|
+
- `assets/` — the Copilot-format source catalog (`core/` hand-authored default install; `agents/`, `skills/`, `instructions/`, `prompts/` extended/opt-in)
|
|
132
|
+
- `assets/claude/` — generated Claude-target twin of the extended tree, plus hand-maintained Claude-only twins of `assets/core/`
|
|
133
|
+
- `scripts/generate-claude-assets.js` — the extended-tree generator; never touches `assets/core/`
|
|
134
|
+
- `src/cli/utils/settings.js` — `VSCODE_SETTINGS_MAP`, `getCoreAssetEntries()`, `VESPER_GIT_PATHS`
|
|
135
|
+
- `src/cli/utils/claude-target.js` — `getClaudePluginDir()`, `installClaudePluginCatalog()`, `ensureClaudeMdGuardBlock()`, `VESPER_REINJECT_COMMAND`
|
|
136
|
+
- `assets/hooks/pre-commit` — the hand-mirrored `vesper_git_paths` shell list
|
|
137
|
+
|
|
138
|
+
## References
|
|
139
|
+
|
|
140
|
+
- [`docs/architecture.md`](../../../docs/architecture.md) — full narrative, all four facts, with additional citations and the specific incidents (BC-2 architecture-review finding, the trailing-slash bug) that motivated this checklist.
|
|
141
|
+
- `.claude/vesper/context.md` — terse, always-loaded version of the same conventions, auto-injected into every session in this repo.
|
|
@@ -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:
|