@empirical-gauzza/cli 1.0.18 → 1.0.19

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/empirical.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  'use strict';
4
4
 
@@ -643,13 +643,20 @@ try {
643
643
  // The message itself is generated per-install from the actual plugin set being installed, not one
644
644
  // fixed string for everyone - e.g. someone who declined empirical-scar-tissue at install time
645
645
  // never sees a scar-tissue reminder, since that capability isn't actually available to them.
646
- function buildPromptReminderMessage(pluginNames) {
646
+ function buildPromptReminderMessage(pluginNames, platform) {
647
647
  const names = normalizePluginNames(pluginNames);
648
648
  const lines = [
649
649
  'Before responding: if this task needs prior context (research, debugging, a spec or status update, a handoff), query Empirical memory first via the empirical-memory skill or empirical memory query - do not assume you already have enough context.'
650
650
  ];
651
- if (names.includes('empirical-work-history')) {
652
- lines.push('If you are picking up previously completed work, check for a recent work-history entry before assuming there is none.');
651
+ if (names.includes('empirical-work-history')) {
652
+ lines.push('If you are picking up previously completed work, check for a recent work-history entry before assuming there is none.');
653
+ // Codex Stop runs after its final response has already been emitted, so it can only be an
654
+ // advisory reminder. Put the completion gate into the pre-response context instead, where
655
+ // Codex can still act on it. Keep this Codex-specific: Claude and Copilot have their own
656
+ // stop-hook control flows and should not receive a changed prompt contract here.
657
+ if (platform === 'codex') {
658
+ lines.push('If this turn results in meaningful completed work, BEFORE sending your final response you MUST use the empirical-work-history skill or record it via Empirical. The entry must carry tag work-history and mass 1; verify the create receipt. CLI fallback must use --json-file with data.session and data.git; do not use the shorthand record command for coding work. Do not wait for the Stop hook.');
659
+ }
653
660
  }
654
661
  if (names.includes('empirical-scar-tissue')) {
655
662
  lines.push('Check for scar tissue before repeating a past mistake in this area.');
@@ -678,8 +685,8 @@ function buildPromptReminderMessage(pluginNames) {
678
685
  // - default (Claude/Copilot's plain console.log was the old assumption for both - WRONG for
679
686
  // Copilot, which requires valid JSON on stdout for every event, confirmed via the same fetch
680
687
  // above): plain console.log, confirmed correct for Claude only.
681
- function buildUserPromptSubmitHookSource(pluginNames, platform) {
682
- const messageLiteral = JSON.stringify(buildPromptReminderMessage(pluginNames));
688
+ function buildUserPromptSubmitHookSource(pluginNames, platform) {
689
+ const messageLiteral = JSON.stringify(buildPromptReminderMessage(pluginNames, platform));
683
690
 
684
691
  let stdinHelper = '';
685
692
  let outputStatement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empirical-gauzza/cli",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Empirical CLI installer and local MCP wiring helper",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",