phewsh 0.15.50 → 0.15.52

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/bin/phewsh.js CHANGED
@@ -149,7 +149,7 @@ function showHelp() {
149
149
  console.log(` ${b(w('configure'))}`);
150
150
  console.log(` ${cyan('login')} ${g('Identity + API key + cloud sync')}`);
151
151
  console.log(` ${cyan('link')} ${g('Link local .intent/ to cloud project')}`);
152
- console.log(` ${cyan('update')} ${g('Update phewsh to the latest version')}`);
152
+ console.log(` ${cyan('update')} ${g('Update phewsh — or `phewsh update auto on` to stay current automatically')}`);
153
153
  console.log('');
154
154
  console.log(` ${g('Works in: Claude Code · Cursor · ChatGPT · any MCP agent')}`);
155
155
  console.log(` ${g('No account needed. Account adds sync + sharing.')}`);
@@ -939,7 +939,7 @@ async function main() {
939
939
  'sync', 'harnesses', 'fallback', 'outcomes', 'tour', 'update', 'upgrade',
940
940
  'agents', 'context', 'truth', 'brief', 'wrap', 'reconcile', 'gate', 'reload', 'sequence', 'seq', 'setup', 'system', 'watch',
941
941
  'next', 'recommend', 'guide', 'thread', 'continuity', 'learn', 'stats',
942
- 'pack', 'packs', 'remember',
942
+ 'pack', 'packs', 'remember', 'commands',
943
943
  ]);
944
944
  const installedIds = harnesses.filter(h => h.installed).map(h => h.id);
945
945
  let turnAbort = null; // AbortController while an API turn streams
@@ -1533,8 +1533,8 @@ async function main() {
1533
1533
  return;
1534
1534
  }
1535
1535
 
1536
- if (cmd === 'help' || cmd === 'h') {
1537
- const wantsAll = /^(all|more|full|everything)$/i.test(cmdArg.trim());
1536
+ if (cmd === 'help' || cmd === 'h' || cmd === 'commands') {
1537
+ const wantsAll = cmd === 'commands' || /^(all|more|full|everything)$/i.test(cmdArg.trim());
1538
1538
 
1539
1539
  // Bare /help → the short essentials a newcomer actually needs.
1540
1540
  if (!wantsAll) {
@@ -1613,6 +1613,13 @@ async function main() {
1613
1613
  console.log(` ${teal('/update')} ${sage('Update phewsh')}`);
1614
1614
  console.log(` ${teal('/tour')} ${sage('Quick walkthrough')}`);
1615
1615
  console.log('');
1616
+ console.log(` ${cream('run in your terminal')} ${slate('— machine setup, run outside a session (not as /cmd)')}`);
1617
+ console.log(` ${teal('phewsh ambient on')} ${sage("Every AI tool inherits your .intent/ — even without launching phewsh")}`);
1618
+ console.log(` ${teal('phewsh shim on')} ${sage('A phewsh status banner before each tool launches — visible proof')}`);
1619
+ console.log(` ${teal('phewsh update auto on')} ${sage('Auto-update in the background on launch (default: notify-only)')}`);
1620
+ console.log(` ${teal('phewsh setup')} ${sage('Guided setup — pick your default route')}`);
1621
+ console.log(` ${slate('also standalone:')} ${teal('phewsh status · next · work · remember')} ${slate('· full list:')} ${teal('phewsh help')}`);
1622
+ console.log('');
1616
1623
  rl.prompt();
1617
1624
  return;
1618
1625
  }
@@ -42,7 +42,8 @@ function discover(cwd = process.cwd(), home = os.homedir()) {
42
42
  }
43
43
  }
44
44
 
45
- // CLAUDE.md — split into manual and generated sections later by parser
45
+ // CLAUDE.md — the claude-md parser strips phewsh's generated block, so only
46
+ // the user's MANUAL content is ingested (safe, no recursion).
46
47
  const claudeMd = path.join(cwd, 'CLAUDE.md');
47
48
  if (fs.existsSync(claudeMd)) {
48
49
  add({ path: claudeMd, type: 'claude-md', name: 'CLAUDE.md', scope: 'project' });
@@ -79,25 +80,8 @@ function discover(cwd = process.cwd(), home = os.homedir()) {
79
80
  }
80
81
  }
81
82
 
82
- // .cursorrules
83
- const cursorrules = path.join(cwd, '.cursorrules');
84
- if (fs.existsSync(cursorrules)) {
85
- add({ path: cursorrules, type: 'cursor', name: '.cursorrules', scope: 'project' });
86
- }
87
-
88
- // agent.md / AGENTS.md (Codex / generic agent instructions, project scope)
89
- for (const name of ['agent.md', 'AGENTS.md']) {
90
- const p = path.join(cwd, name);
91
- if (fs.existsSync(p)) {
92
- add({ path: p, type: 'agent', name, scope: 'project' });
93
- }
94
- }
95
-
96
- // GEMINI.md (project scope)
97
- const geminiMd = path.join(cwd, 'GEMINI.md');
98
- if (fs.existsSync(geminiMd)) {
99
- add({ path: geminiMd, type: 'agent', name: 'GEMINI.md', scope: 'project' });
100
- }
83
+ // (.cursorrules / AGENTS.md / GEMINI.md intentionally NOT read as sources —
84
+ // see note above: they are phewsh-managed outputs, not source truth.)
101
85
 
102
86
  // soul.md
103
87
  const soulMd = path.join(cwd, 'soul.md');
@@ -59,11 +59,16 @@ function emit(chunks, options = {}) {
59
59
  sections.push('');
60
60
  }
61
61
 
62
- // 3. State — what's happening now
62
+ // 3. State — what's happening now. LEAN: the latest entry only, capped — the
63
+ // full log lives in .intent/status.md. Architecture over prose: this block
64
+ // points at the source of truth, it does not become the source of truth.
63
65
  if (byKind.state?.length > 0) {
64
66
  sections.push('## Current State');
65
- for (const chunk of byKind.state) {
66
- sections.push(embedChunk(chunk));
67
+ const body = embedChunk(byKind.state[0]).split('\n').filter(l => l.trim());
68
+ sections.push(body.slice(0, 8).join('\n'));
69
+ if (body.length > 8 || byKind.state.length > 1) {
70
+ sections.push('');
71
+ sections.push('_Full state & history: `.intent/status.md` · run `phewsh status`._');
67
72
  }
68
73
  sections.push('');
69
74
  }
@@ -59,6 +59,14 @@ function sequence(options = {}) {
59
59
  sources = sources.filter(s => s.scope !== 'global');
60
60
  }
61
61
 
62
+ // A file's generated block must not restate the file's own manual content —
63
+ // that's circular (parallel truth). When emitting the claude-md block, drop
64
+ // the project CLAUDE.md source itself. The block carries .intent/-derived
65
+ // state and points at the source of truth; it does not echo the host file.
66
+ if (target === 'claude-md') {
67
+ sources = sources.filter(s => s.type !== 'claude-md');
68
+ }
69
+
62
70
  // Filter sources if requested
63
71
  if (sourceFilter && sourceFilter.length > 0) {
64
72
  sources = sources.filter(s =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phewsh",
3
- "version": "0.15.50",
3
+ "version": "0.15.52",
4
4
  "description": "Turn intent into action. Structure your thinking, execute your next step.",
5
5
  "bin": {
6
6
  "phewsh": "bin/phewsh.js"