neuvikon 0.2.28 → 0.2.30

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.
Files changed (2) hide show
  1. package/dist/index.mjs +40 -15
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -733,6 +733,27 @@ function parsePayload(raw) {
733
733
  }
734
734
  }
735
735
  /**
736
+ * What actually gets the model/effort switch to happen, versus the
737
+ * AGENTS.md wording alone: tested against real tickets, an agent reading
738
+ * "judge difficulty and switch model" in its rules file consistently read
739
+ * past it and started working at whatever model/effort it already had —
740
+ * the instruction competed with everything else in that file and lost.
741
+ *
742
+ * `UserPromptSubmit` can inject `additionalContext`, which Claude Code
743
+ * surfaces as a system-level reminder on the *same turn* the ticket lands,
744
+ * not as background file content the agent may or may not re-read. It's
745
+ * still just text — this can't force a `/model`/`/effort` call, only put it
746
+ * in front of the model at the one moment it's actually relevant instead of
747
+ * buried in a rules file next to a dozen other instructions.
748
+ */
749
+ const MODEL_TRIAGE_CONTEXT = "A Neuvikon ticket just landed in this prompt. Before reading any file or running `start`: judge how difficult it actually is. If it's a small, mechanical change (button placement, a copy/label edit, a trivial styling tweak, a one-line config change), send `/model haiku` and `/effort low` now, as their own messages, before touching the ticket — there's no reason to spend a frontier model thinking hard about something this small. If it needs real design judgment, touches multiple systems, or you're unsure, stay on the current model and effort level instead.";
750
+ function hookResponse(additionalContext) {
751
+ return JSON.stringify({ hookSpecificOutput: {
752
+ hookEventName: "UserPromptSubmit",
753
+ additionalContext
754
+ } });
755
+ }
756
+ /**
736
757
  * The `UserPromptSubmit` counterpart to `start`. Unlike `start`, this runs on
737
758
  * *every* prompt regardless of whether it mentions a ticket, so it must never
738
759
  * fail the hook and block the user's message — no credentials, no ticket ref,
@@ -745,6 +766,7 @@ async function hookStart() {
745
766
  const { prompt, transcriptPath } = parsePayload(await readStdin());
746
767
  const [ref] = extractTicketRefs(prompt ?? "");
747
768
  if (!ref) return;
769
+ process.stdout.write(hookResponse(MODEL_TRIAGE_CONTEXT));
748
770
  const existing = readSession();
749
771
  if (existing?.ticket === ref) return;
750
772
  const transcript = transcriptPath ?? claudeTranscriptPath();
@@ -851,27 +873,30 @@ const START_MARKER = "<!-- neuvikon:start -->";
851
873
  const END_MARKER = "<!-- neuvikon:end -->";
852
874
  const INSTRUCTION_BODY = `## Neuvikon ticket tracking
853
875
 
854
- When the user hands you a Neuvikon ticket — text beginning with a reference like
855
- \`EWWQ-1:\` — run this before you start working on it:
856
-
857
- npx neuvikon start --ticket EWWQ-1
858
-
859
- Before doing anything else, judge how difficult the ticket actually is, and
860
- match both your model and your reasoning effort to it instead of defaulting
861
- to maximum for everything:
876
+ **The moment you receive a Neuvikon ticket — text beginning with a reference
877
+ like \`EWWQ-1:\` — before reading any file, before running \`start\`, before
878
+ anything else: judge its difficulty and act on it.** This is a real step, not
879
+ background bookkeeping — if your CLI supports switching model or reasoning
880
+ effort mid-session (Claude Code: \`/model\`, \`/effort\`; Codex: \`/model\`,
881
+ \`/reasoning\`), the command to do that is the literal first thing you send,
882
+ on its own, before you touch the ticket:
862
883
 
863
884
  - Small, mechanical change — swapping button placement, a copy/label edit, a
864
- trivial styling tweak, a one-line config change: switch to a cheaper/faster
865
- model if your CLI supports doing so mid-session (e.g. \`/model haiku\`), and
866
- drop reasoning effort to its lowest setting (e.g. \`/effort low\` in Claude
867
- Code, \`/reasoning low\` in Codex). There's no reason to spend a frontier
868
- model thinking hard about something this small.
885
+ trivial styling tweak, a one-line config change: send \`/model haiku\` (or
886
+ your CLI's equivalent cheap/fast model) and \`/effort low\` (or
887
+ \`/reasoning low\`) right now, as their own messages, before doing anything
888
+ else. There's no reason to spend a frontier model thinking hard about
889
+ something this small, and downgrading after you've already started reading
890
+ code is too late to save anything.
869
891
  - Needs real design judgment, touches multiple systems, or you're unsure:
870
892
  stay on your current model and effort level — don't downgrade either just
871
893
  to save cost on something that actually needs it.
894
+ - Your CLI doesn't expose a way to change model or effort mid-session: skip
895
+ this and go straight to the ticket.
872
896
 
873
- If your CLI doesn't expose a way to change model or effort mid-session,
874
- skip this and just work the ticket.
897
+ Only after that's decided, run this before you start working on the ticket:
898
+
899
+ npx neuvikon start --ticket EWWQ-1
875
900
 
876
901
  Before you start, and any time you need more context, read the ticket's
877
902
  project pages — this is the project's accumulated knowledge, not just this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neuvikon",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
4
4
  "description": "Tell Neuvikon which ticket your coding agent is working on.",
5
5
  "keywords": [
6
6
  "neuvikon",