feat(claude): nudge fresh sessions to load the pql + clide skills (T-490)

A fresh Claude session now gets a one-line preamble (clideSkillsNote) telling it
to reach for the bundled pql + clide skills from its first turn rather than
rediscovering the workflows. Layered onto clideContextNote in the single
--append-system-prompt.

Gated on a NEW session (!spec.resume && !spec.isFork): new tabs and the
post-/clear respawn spawn with resume:false and get it; the account-change
respawn (T-480) and real resumes carry prior context (resume:true), and forks
inherit their source — none are re-nagged. Both skills already ship (pql
user-scope, clide repo-scope), so no precursor was needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-28 10:53:08 +02:00
co-authored by Claude Opus 4.8
parent a46677facf
commit 84f4b20cb8
7 changed files with 108 additions and 0 deletions
@@ -58,6 +58,16 @@ String clideContextNote(String workspaceRoot) =>
'is how you observe and drive the same workspace the user sees — prefer it for IDE actions so '
'your work and the user\'s stay in one shared workspace.';
/// Nudge a FRESH session to reach for the bundled skills from its first turn
/// rather than rediscovering the workflows (T-490). Layered on top of
/// [clideContextNote]; only injected for new sessions (not --resume / forks),
/// so a session that already carries context is never re-nagged.
String clideSkillsNote() =>
'Two skills are available in this workspace — load and use them from your first turn instead '
'of rediscovering their workflows: `pql` (planning, decisions, tickets, and vault queries) and '
'`clide` (driving this IDE). Reach for the matching skill whenever a task touches planning or '
'tickets, or the clide surface.';
/// Build the environment DELTA to overlay on a hosted session's inherited
/// environment (T-215). `Process.start` keeps the parent environment by
/// default, so this returns only the keys to add/override:
@@ -244,6 +244,11 @@ class ClaudeSessionOrchestrator extends ChangeNotifier {
// note and the team preamble merge into ONE --append-system-prompt (claude
// honours a single one).
final preambles = <String>[clideContextNote(spec.cwd)];
// Nudge a FRESH session to reach for the bundled skills (T-490). A new tab
// and the post-/clear respawn spawn with resume:false; the account-change
// respawn (T-480) and real resumes carry prior context (resume:true), and a
// fork inherits its source — none of those are re-nagged.
if (!spec.resume && !spec.isFork) preambles.add(clideSkillsNote());
if (spec.team) {
final name = spec.memberName ?? spec.role;
broker.addMember(TeamMemberRef(id: spec.id, name: name, role: spec.role));