cursordoctrine 0.6.1 → 0.6.2

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/bin/cli.mjs +8 -12
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -334,22 +334,18 @@ function verify() {
334
334
  JSON.stringify({ role: 'user', message: { content: `<user_query>${q}</user_query>` } }) + '\n',
335
335
  'utf8');
336
336
 
337
- // --- Case 0: no .scope.json + NO transcript -> WRITE scaffold anyway -------
338
- // This is the 0.5.3 regression: creation was gated on $hasQuery, so when
339
- // Cursor didn't surface transcript_path in the first postToolUse fire, the
340
- // scope never appeared. Now creation is unconditional on a real root.
337
+ // --- Case 0: no .scope.json + NO transcript -> do NOT write hollow scaffold
338
+ // 0.6.1: never persist intent=<TODO> when the request is unreadable. Emit the
339
+ // pre-compile demand so the agent authors a real contract from the chat.
341
340
  runHook(hook('intent-anchor'), { conversation_id: anchorCid, cwd: repoDir });
342
341
  let d0 = drainedOf(anchorCid);
343
- if (!existsSync(scopePath)) {
344
- cleanup(); return { ok: false, detail: 'scaffold NOT created without transcript (0.5.3 regression)' };
342
+ if (existsSync(scopePath)) {
343
+ cleanup(); return { ok: false, detail: 'hollow scaffold written without transcript (0.6.1 regression)' };
345
344
  }
346
- let scope0;
347
- try { scope0 = JSON.parse(readFileSync(scopePath, 'utf8')); }
348
- catch { cleanup(); return { ok: false, detail: '.scope.json (no-transcript) is not valid JSON' }; }
349
- if (!scope0.intent || !scope0.intent.includes('TODO')) {
350
- cleanup(); return { ok: false, detail: `no-transcript scaffold should have intent <TODO>, got: ${scope0.intent}` };
345
+ if (!d0.includes('INTENT ANCHOR (pre-compile)')) {
346
+ cleanup(); return { ok: false, detail: 'no-transcript turn did not emit pre-compile demand' };
351
347
  }
352
- // Clear the latch + scope so Case A starts fresh (with a real query this time).
348
+ // Clear the latch so Case A starts fresh (with a real query this time).
353
349
  runHook(hook('final-review'), { conversation_id: anchorCid, status: 'completed' });
354
350
  cleanup();
355
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursordoctrine",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Thin self-review hooks for Cursor — the model is the auditor. Pruned + deduplicated: intent-anchor (auto-scaffolded .scope.json per prompt + per-turn re-injection against Salience Dilution), intent-trace final review, unified anti-slop checklist as single source of truth.",
5
5
  "bin": {
6
6
  "cursordoctrine": "bin/cli.mjs"