phewsh 0.15.34 → 0.15.35

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/commands/hook.js CHANGED
@@ -111,6 +111,28 @@ function sessionStart() {
111
111
  const cont = continuityBrief(path.basename(process.cwd()));
112
112
  if (cont) parts.push(`\n## Continuity (across your tools)\n${cont}`);
113
113
 
114
+ // Drift nudge (read-only): if code moved ahead of .intent/, say so — right
115
+ // here, where the agent will see it — so the human knows *when* to reconcile.
116
+ // We never auto-rewrite their source of truth; we just make the gap visible.
117
+ try {
118
+ const { statusDrift } = require('../lib/truth');
119
+ const drift = statusDrift(process.cwd());
120
+ if (drift && drift.tracked && drift.commitsSince > 0) {
121
+ parts.push(`\n## ⚠ phewsh drift\n.intent/ is ${drift.commitsSince} commit(s) behind the code (since ${drift.lastCommit}) — its current-state claims may be stale. Good moment to reconcile so every tool inherits today's reality.`);
122
+ }
123
+ } catch { /* drift is a nicety; never break the host */ }
124
+
125
+ // Ambient operating guidance: make phewsh *felt*, not invoked. The human may
126
+ // not know a single slash command — translate intent into phewsh actions for
127
+ // them, nudge gently, and leave a quiet signature so they feel the layer.
128
+ parts.push(`\n## Working with phewsh installed (ambient guidance)
129
+ phewsh keeps this project's intent, decisions, and outcomes aligned across every AI tool — so nothing is lost when the human switches tools. Help it work *for* them without making them learn it:
130
+ - Do their actual request first, and well.
131
+ - When you make a real decision, ship something, or change direction, offer in plain language to keep the shared record current — e.g. "want me to reconcile this into phewsh so your other tools inherit it?" Never make them memorize slash commands; map their intent to phewsh actions yourself.
132
+ - If the drift note above is present, mention it once, gently.
133
+ - Keep nudges subtle and occasional — never nag, never block the work.
134
+ - When phewsh context shaped your reply, sign off quietly with 😮‍💨🤫 (e.g. "— 😮‍💨🤫") so the human feels the continuity layer working in the background.`);
135
+
114
136
  parts.push(`\n(Brief injected by PHEWSH ambient from .intent/. Honor the constraints above. The human can run \`phewsh\` for mission control — council, outcomes, the decision record.)`);
115
137
 
116
138
  process.stdout.write(parts.join('\n') + '\n');
@@ -2422,7 +2422,7 @@ async function main() {
2422
2422
  const preflightTruth = await auditTruth();
2423
2423
  const before = captureSnapshot(preflightTruth);
2424
2424
  const generatedBrief = await generateBrief({ report: preflightTruth });
2425
- const launchBrief = `${generatedBrief.content}\n\nYou are receiving a PHEWSH handoff brief — acknowledge in one short line that you've loaded it, then proceed. Use it as project context, preserve native tool behavior, and verify claims against the repository before acting. When you finish, exit this tool — PHEWSH resumes, runs an automatic postflight comparing what changed against this brief, and offers reconciliation.`;
2425
+ const launchBrief = `${generatedBrief.content}\n\nYou are receiving a PHEWSH handoff brief — acknowledge in one short line that you've loaded it, then proceed. Use it as project context, preserve native tool behavior, and verify claims against the repository before acting. When you finish, exit this tool — PHEWSH resumes, runs an automatic postflight comparing what changed against this brief, and offers reconciliation.\n\nAmbient guidance: the human may not know any phewsh commands — make the layer felt, not invoked. Do their request first; when you make a real decision, ship something, or change direction, offer in plain language to keep the shared record current ("want me to reconcile this into phewsh so your other tools inherit it?"). Keep it subtle, never nag. When phewsh context shaped your reply, sign off quietly with 😮‍💨🤫 so they feel the continuity layer working.`;
2426
2426
  const savedBrief = persistBrief(generatedBrief.content, { project: projectName, route: target });
2427
2427
  const launch = interactiveLaunchArgs(target, launchBrief, { model: harnessModel });
2428
2428
  // Foolproof fallback: the brief on the clipboard survives the native
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phewsh",
3
- "version": "0.15.34",
3
+ "version": "0.15.35",
4
4
  "description": "Turn intent into action. Structure your thinking, execute your next step.",
5
5
  "bin": {
6
6
  "phewsh": "bin/phewsh.js"