truthmark 2.2.3 → 2.2.5

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/dist/main.js CHANGED
@@ -254,7 +254,8 @@ var SUPPORTED_PLATFORMS = [
254
254
  "opencode",
255
255
  "claude-code",
256
256
  "github-copilot",
257
- "gemini-cli"
257
+ "antigravity",
258
+ "cursor"
258
259
  ];
259
260
  var DEFAULT_PLATFORMS = [];
260
261
  var truthmarkConfigSchema = {
@@ -2267,29 +2268,6 @@ var renderCopilotCustomAgentModeSection = (agents, parentRule, writeAgents = [])
2267
2268
  `- ${parentRule}`
2268
2269
  ].join("\n");
2269
2270
  };
2270
- var renderGeminiSubagentModeSection = (agents, parentRule, writeAgents = []) => {
2271
- const mentions = agents.map((agent) => `@${agent.replace(/_/gu, "-")}`);
2272
- const writeMentions = writeAgents.map(
2273
- (agent) => `@${agent.replace(/_/gu, "-")}`
2274
- );
2275
- const writeAgentLines = writeMentions.length > 0 ? [
2276
- `- dispatch write-capable project subagents only with explicit write leases: ${writeMentions.join(", ")}`,
2277
- "- each write lease must name objective, required reads, allowed writes, forbidden writes, evidence, verification, and report fields",
2278
- "- write workers must stop when a required edit is off-lease and report status, filesChanged, evidence, offLeaseChanges, blockers, and notes",
2279
- "- parent must inspect the actual checkout diff against each lease before accepting a worker report"
2280
- ] : [];
2281
- const readOnlyScope = writeAgents.length > 0 ? "for verification" : "only";
2282
- const readOnlySubagentLabel = writeAgents.length > 0 ? "read-only subagents" : "subagents";
2283
- return [
2284
- "Gemini CLI subagent mode:",
2285
- "- use automatically when this workflow runs in Gemini CLI and the parent agent chooses bounded project subagent fan-out",
2286
- `- dispatch read-only project subagents ${readOnlyScope}: ${mentions.join(", ")}`,
2287
- `- ${readOnlySubagentLabel} inspect checkout evidence directly, return structured findings, and must not edit files`,
2288
- `- parent supplies bounded evidence shards; ${readOnlySubagentLabel} must not preload host instruction files or repo-wide policy docs unless assigned as evidence`,
2289
- ...writeAgentLines,
2290
- `- ${parentRule}`
2291
- ].join("\n");
2292
- };
2293
2271
  var defaultAgentConfig = () => {
2294
2272
  return createDefaultConfig();
2295
2273
  };
@@ -2545,46 +2523,6 @@ var TRUTHMARK_WORKFLOW_MANIFEST = {
2545
2523
  allowedWrites: ["functional code"],
2546
2524
  reportSections: ["Truth docs used", "Code updated", "Verification"]
2547
2525
  },
2548
- "truthmark-preview": {
2549
- id: "truthmark-preview",
2550
- displayName: "Truthmark Preview",
2551
- description: "Use when the user explicitly asks to preview likely workflow routing, target files, writes, or subagent use before edits. Not for validation, automatic gates, final correctness, or replacing Truth Check.",
2552
- shortDescription: "Preview likely workflow routing before edits; read-only and explicit",
2553
- defaultPrompt: "Use Truthmark Preview to estimate likely workflow routing before edits.",
2554
- allowImplicitInvocation: false,
2555
- positiveTriggers: [
2556
- "explicit request to preview Truthmark workflow routing before edits",
2557
- "explicit request for likely route owner, target docs, expected writes, or subagent plan"
2558
- ],
2559
- negativeTriggers: [
2560
- "normal validation or final correctness audit",
2561
- "automatic preflight or finish-time review",
2562
- "request to mutate truth docs, routing, or code"
2563
- ],
2564
- forbiddenAdjacency: [
2565
- "must not replace Truth Check",
2566
- "must not run Truth Sync automatically",
2567
- "must not authorize later edits or issue write leases"
2568
- ],
2569
- reviewQuestions: [
2570
- "read-only boundary",
2571
- "intended-not-authorized handoff",
2572
- "manual handoff questions"
2573
- ],
2574
- allowedWrites: ["none by default"],
2575
- reportSections: [
2576
- "Requested outcome",
2577
- "Likely workflow",
2578
- "Why this workflow",
2579
- "Likely route owner",
2580
- "Expected write classes",
2581
- "Expected target files",
2582
- "Suggested subagent use",
2583
- "Manual handoff questions",
2584
- "Handoff"
2585
- ],
2586
- subagents: ["truth_route_auditor"]
2587
- },
2588
2526
  "truthmark-check": {
2589
2527
  id: "truthmark-check",
2590
2528
  displayName: "Truthmark Check",
@@ -2673,7 +2611,6 @@ var getTruthmarkWorkflow = (id) => {
2673
2611
  };
2674
2612
 
2675
2613
  // src/agents/truth-check.ts
2676
- var TRUTH_CHECK_EXPLICIT_INVOCATIONS = "OpenCode /skill truthmark-check; Codex /truthmark-check or $truthmark-check; Claude Code /truthmark-check; GitHub Copilot /truthmark-check; Gemini CLI /truthmark:check.";
2677
2614
  var renderTruthCheckReportExample = (config = defaultAgentConfig()) => {
2678
2615
  const rootRouteIndex = config.truthmark.paths.routesIndex;
2679
2616
  return `Truth Check: completed
@@ -2730,8 +2667,6 @@ var renderTruthCheckProcedureBody = (config = defaultAgentConfig(), options = {}
2730
2667
 
2731
2668
  Use this skill to audit repository truth health.
2732
2669
 
2733
- Invocations: ${TRUTH_CHECK_EXPLICIT_INVOCATIONS}
2734
-
2735
2670
  Truth Check is agent-led:
2736
2671
 
2737
2672
  - inspect .truthmark/config.yml and configured route files only when they exist; then inspect canonical docs and relevant implementation directly
@@ -2765,7 +2700,6 @@ ${DECISION_TRUTH_INSTRUCTIONS}`;
2765
2700
  };
2766
2701
 
2767
2702
  // src/agents/truth-document.ts
2768
- var TRUTH_DOCUMENT_EXPLICIT_INVOCATIONS = "OpenCode /skill truthmark-document; Codex /truthmark-document or $truthmark-document; Claude Code /truthmark-document; GitHub Copilot /truthmark-document; Gemini CLI /truthmark:document.";
2769
2703
  var renderTruthDocumentReportExample = (config = defaultAgentConfig()) => {
2770
2704
  const engineeringTruthRoot = resolveEngineeringTruthRoot(config);
2771
2705
  return `Truth Document: completed
@@ -2832,7 +2766,6 @@ var renderTruthDocumentProcedureBody = (config = defaultAgentConfig(), options =
2832
2766
  return `# Truthmark Document
2833
2767
 
2834
2768
  Use this skill to document existing implemented behavior when no functional-code changes are required for the task.
2835
- Invocations: ${TRUTH_DOCUMENT_EXPLICIT_INVOCATIONS}
2836
2769
 
2837
2770
  Truth Document is manual and implementation-first:
2838
2771
 
@@ -2881,105 +2814,7 @@ Parent post-document verification:
2881
2814
  - verify the final report records ownership review, structure requirement, restructure, routing update, or manual handoff reason when applicable`;
2882
2815
  };
2883
2816
 
2884
- // src/agents/truth-preview.ts
2885
- var TRUTH_PREVIEW_EXPLICIT_INVOCATIONS = {
2886
- copilot: "GitHub Copilot /truthmark-preview.",
2887
- gemini: "Gemini CLI /truthmark:preview."
2888
- };
2889
- var renderTruthPreviewReportExample = (config = defaultAgentConfig()) => {
2890
- return `Truth Preview: completed
2891
-
2892
- Requested outcome:
2893
- - preview likely Truthmark workflow routing before edits
2894
-
2895
- Likely workflow:
2896
- - truthmark-document
2897
-
2898
- Why this workflow:
2899
- - positive trigger: document existing implemented behavior
2900
- - negative triggers considered: functional-code change, doc-first implementation, topology repair, truth audit
2901
- - forbidden adjacency considered: must not edit functional code
2902
-
2903
- Likely route owner:
2904
- - route file: ${config.truthmark.paths.routesIndex}
2905
- - likely lane impact: engineering-lane
2906
- - product target docs: none identified
2907
- - engineering target docs: ${config.truthmark.paths.engineeringTruthRoot}/behaviors/example.md
2908
- - confidence: medium
2909
-
2910
- Expected write classes:
2911
- - truth docs
2912
-
2913
- Expected target files:
2914
- - ${config.truthmark.paths.engineeringTruthRoot}/behaviors/example.md
2915
-
2916
- Suggested subagent use:
2917
- - read-only verifiers: truth_route_auditor
2918
- - write workers: none in Preview
2919
- - leases needed: none in Preview
2920
-
2921
- Manual handoff questions:
2922
- - none identified in preview
2923
-
2924
- Handoff:
2925
- - Run the selected Truthmark workflow after user approval.`;
2926
- };
2927
- var renderTruthPreviewAdapterReportFields = () => {
2928
- return `Return a concise Truth Preview report with these fields:
2929
- - requested outcome
2930
- - likely workflow
2931
- - why this workflow
2932
- - likely route owner and lane impact
2933
- - expected write classes
2934
- - expected target files
2935
- - suggested subagent use
2936
- - manual handoff questions
2937
- - handoff recommendation`;
2938
- };
2939
- var renderTruthPreviewProcedureBody = (config = defaultAgentConfig(), host) => {
2940
- const invocationLine = host === void 0 ? "" : `Invocations: ${TRUTH_PREVIEW_EXPLICIT_INVOCATIONS[host]}
2941
-
2942
- `;
2943
- return `Use this skill only when the user explicitly asks to preview Truthmark routing or workflow choice before edits.
2944
-
2945
- ${invocationLine}Truth Preview is read-only. Its report is intended, not authorized.
2946
-
2947
- Purpose:
2948
- - preview the likely Truthmark workflow, route owner, target files, expected write classes, suggested subagent use, and manual handoff questions before edits happen
2949
- - report likely product lane impact, engineering lane impact, target docs, and ambiguity before edits
2950
- - hand off to the selected workflow after user approval
2951
- - keep the selector thin so agents can avoid loading or acting through heavier workflows prematurely
2952
-
2953
- Read:
2954
- - .truthmark/config.yml, only when present
2955
- - ${config.truthmark.paths.routesIndex}, first, only when present
2956
- - relevant child route files under ${config.truthmark.paths.routeAreasRoot}/ for the selected scope or changed paths, only when present
2957
- - relevant truth docs and implementation files needed to preview ownership
2958
- - Evidence authority:
2959
- ${renderBulletBlock(EVIDENCE_AUTHORITY_INSTRUCTIONS)}
2960
- - Lane classification:
2961
- ${renderReadOnlyLaneClassificationRuleBlock(config)}
2962
-
2963
- Do not:
2964
- - must not edit files
2965
- - must not create truth docs
2966
- - must not update routing
2967
- - must not run Truth Sync automatically
2968
- - must not replace Truth Check
2969
- - must not claim final correctness
2970
- - must not issue write leases
2971
- - must not mutate code
2972
-
2973
- Suggested subagent use:
2974
- - optional read-only verifier: truth_route_auditor
2975
- - write workers: none
2976
- - leases needed: none
2977
-
2978
- ${renderHierarchySummary(config)}`;
2979
- };
2980
-
2981
2817
  // src/agents/truthmark-portal.ts
2982
- var TRUTHMARK_PORTAL_EXPLICIT_INVOCATIONS = "OpenCode /skill truthmark-portal; Codex /truthmark-portal or $truthmark-portal; Claude Code /truthmark-portal; GitHub Copilot /truthmark-portal; Gemini CLI /truthmark:portal.";
2983
2818
  var renderTruthmarkPortalProcedureBody = (config = defaultAgentConfig()) => {
2984
2819
  const output = config.truthmark.paths.portalOutput;
2985
2820
  const template = config.truthmark.paths.portalTemplate;
@@ -2987,8 +2822,6 @@ var renderTruthmarkPortalProcedureBody = (config = defaultAgentConfig()) => {
2987
2822
 
2988
2823
  Truthmark Portal is a manual-only presentation workflow. It is never an automatic completion workflow, never Truth Sync, and runs only when the user explicitly asks to generate, refresh, or update the committed static HTML Portal.
2989
2824
 
2990
- Invocations: ${TRUTHMARK_PORTAL_EXPLICIT_INVOCATIONS}
2991
-
2992
2825
  Core rules:
2993
2826
 
2994
2827
  - Markdown remains canonical; generated HTML is presentation only.
@@ -3018,7 +2851,6 @@ ${renderHierarchySummary(config)}`;
3018
2851
  };
3019
2852
 
3020
2853
  // src/agents/truth-structure.ts
3021
- var TRUTH_STRUCTURE_EXPLICIT_INVOCATIONS = "OpenCode /skill truthmark-structure; Codex /truthmark-structure or $truthmark-structure; Claude Code /truthmark-structure; GitHub Copilot /truthmark-structure; Gemini CLI /truthmark:structure.";
3022
2854
  var renderTruthStructureReportExample = (config = defaultAgentConfig()) => {
3023
2855
  const productTruthRoot = resolveProductTruthRoot(config);
3024
2856
  const engineeringTruthRoot = resolveEngineeringTruthRoot(config);
@@ -3073,7 +2905,7 @@ var renderTruthStructureProcedureBody = (config = defaultAgentConfig(), options
3073
2905
  ` : "";
3074
2906
  const subagentMode = `${claudeSubagentMode}${copilotCustomAgentMode}`;
3075
2907
  return `Use this skill to design or repair Truthmark area structure.
3076
- Invocations: ${TRUTH_STRUCTURE_EXPLICIT_INVOCATIONS}
2908
+
3077
2909
  Truth Structure is agent-native:
3078
2910
  - inspect repository layout, current docs, Truthmark config and route files when present, and relevant code directly
3079
2911
  - Evidence authority:
@@ -3329,7 +3161,6 @@ var renderTruthSyncBlockedReport = (input) => {
3329
3161
  };
3330
3162
 
3331
3163
  // src/agents/truth-sync.ts
3332
- var TRUTH_SYNC_EXPLICIT_INVOCATIONS = "OpenCode /skill truthmark-sync; Codex /truthmark-sync or $truthmark-sync; Claude Code /truthmark-sync; GitHub Copilot /truthmark-sync; Gemini CLI /truthmark:sync.";
3333
3164
  var renderTruthSyncProductDecisionRuleBlock = (config) => {
3334
3165
  return renderBulletBlock(
3335
3166
  [
@@ -3369,8 +3200,7 @@ var renderTruthSyncProcedureBody = (config = defaultAgentConfig(), options = {})
3369
3200
  ` : "";
3370
3201
  const subagentMode = `${claudeSubagentMode}${codexSubagentMode}${copilotCustomAgentMode}${openCodeSubagentMode}`;
3371
3202
  return `Use this skill automatically before finishing when functional code changed since the last successful Truth Sync. Also run it immediately when the user explicitly invokes Truth Sync.
3372
- Invocations: ${TRUTH_SYNC_EXPLICIT_INVOCATIONS}
3373
- Explicit invocation runs immediately. Later functional-code changes need a fresh finish-time review, and an earlier explicit run satisfies the finish-time review only if no later functional-code changes occur.
3203
+ Explicit invocation runs immediately when the user directly requests this workflow. Later functional-code changes need a fresh finish-time review, and an earlier explicit run satisfies the finish-time review only if no later functional-code changes occur.
3374
3204
  Skip when changes are documentation-only, formatting-only, clearly behavior-preserving renames with no truth impact, when no Truthmark config exists yet, or when there are no functional code changes.
3375
3205
  Parent workflow:
3376
3206
  1. Inspect git status, staged changes, unstaged changes, and untracked files directly.
@@ -3462,37 +3292,28 @@ var TRUTHMARK_CLAUDE_ROUTE_AUDITOR_AGENT_PATH = ".claude/agents/truth-route-audi
3462
3292
  var TRUTHMARK_CLAUDE_CLAIM_VERIFIER_AGENT_PATH = ".claude/agents/truth-claim-verifier.md";
3463
3293
  var TRUTHMARK_CLAUDE_DOC_REVIEWER_AGENT_PATH = ".claude/agents/truth-doc-reviewer.md";
3464
3294
  var TRUTHMARK_CLAUDE_DOC_WRITER_AGENT_PATH = ".claude/agents/truth-doc-writer.md";
3465
- var TRUTHMARK_GEMINI_STRUCTURE_COMMAND_PATH = ".gemini/commands/truthmark/structure.toml";
3466
- var TRUTHMARK_GEMINI_DOCUMENT_COMMAND_PATH = ".gemini/commands/truthmark/document.toml";
3467
- var TRUTHMARK_GEMINI_SYNC_COMMAND_PATH = ".gemini/commands/truthmark/sync.toml";
3468
- var TRUTHMARK_GEMINI_REALIZE_COMMAND_PATH = ".gemini/commands/truthmark/realize.toml";
3469
- var TRUTHMARK_GEMINI_CHECK_COMMAND_PATH = ".gemini/commands/truthmark/check.toml";
3470
- var TRUTHMARK_GEMINI_PREVIEW_COMMAND_PATH = ".gemini/commands/truthmark/preview.toml";
3471
- var TRUTHMARK_GEMINI_PORTAL_COMMAND_PATH = ".gemini/commands/truthmark/portal.toml";
3472
- var TRUTHMARK_GEMINI_ROUTE_AUDITOR_AGENT_PATH = ".gemini/agents/truth-route-auditor.md";
3473
- var TRUTHMARK_GEMINI_CLAIM_VERIFIER_AGENT_PATH = ".gemini/agents/truth-claim-verifier.md";
3474
- var TRUTHMARK_GEMINI_DOC_REVIEWER_AGENT_PATH = ".gemini/agents/truth-doc-reviewer.md";
3475
- var TRUTHMARK_GEMINI_DOC_WRITER_AGENT_PATH = ".gemini/agents/truth-doc-writer.md";
3295
+ var TRUTHMARK_ANTIGRAVITY_STRUCTURE_RULE_PATH = ".antigravity/rules/truthmark-structure.md";
3296
+ var TRUTHMARK_ANTIGRAVITY_DOCUMENT_RULE_PATH = ".antigravity/rules/truthmark-document.md";
3297
+ var TRUTHMARK_ANTIGRAVITY_SYNC_RULE_PATH = ".antigravity/rules/truthmark-sync.md";
3298
+ var TRUTHMARK_ANTIGRAVITY_REALIZE_RULE_PATH = ".antigravity/rules/truthmark-realize.md";
3299
+ var TRUTHMARK_ANTIGRAVITY_CHECK_RULE_PATH = ".antigravity/rules/truthmark-check.md";
3300
+ var TRUTHMARK_ANTIGRAVITY_PORTAL_RULE_PATH = ".antigravity/rules/truthmark-portal.md";
3301
+ var TRUTHMARK_CURSOR_STRUCTURE_SKILL_PATH = ".cursor/skills/truthmark-structure/SKILL.md";
3302
+ var TRUTHMARK_CURSOR_DOCUMENT_SKILL_PATH = ".cursor/skills/truthmark-document/SKILL.md";
3303
+ var TRUTHMARK_CURSOR_SYNC_SKILL_PATH = ".cursor/skills/truthmark-sync/SKILL.md";
3304
+ var TRUTHMARK_CURSOR_REALIZE_SKILL_PATH = ".cursor/skills/truthmark-realize/SKILL.md";
3305
+ var TRUTHMARK_CURSOR_CHECK_SKILL_PATH = ".cursor/skills/truthmark-check/SKILL.md";
3306
+ var TRUTHMARK_CURSOR_PORTAL_SKILL_PATH = ".cursor/skills/truthmark-portal/SKILL.md";
3476
3307
  var TRUTHMARK_COPILOT_STRUCTURE_PROMPT_PATH = ".github/prompts/truthmark-structure.prompt.md";
3477
3308
  var TRUTHMARK_COPILOT_DOCUMENT_PROMPT_PATH = ".github/prompts/truthmark-document.prompt.md";
3478
3309
  var TRUTHMARK_COPILOT_SYNC_PROMPT_PATH = ".github/prompts/truthmark-sync.prompt.md";
3479
3310
  var TRUTHMARK_COPILOT_REALIZE_PROMPT_PATH = ".github/prompts/truthmark-realize.prompt.md";
3480
3311
  var TRUTHMARK_COPILOT_CHECK_PROMPT_PATH = ".github/prompts/truthmark-check.prompt.md";
3481
- var TRUTHMARK_COPILOT_PREVIEW_PROMPT_PATH = ".github/prompts/truthmark-preview.prompt.md";
3482
3312
  var TRUTHMARK_COPILOT_PORTAL_PROMPT_PATH = ".github/prompts/truthmark-portal.prompt.md";
3483
3313
  var TRUTHMARK_COPILOT_ROUTE_AUDITOR_AGENT_PATH = ".github/agents/truth-route-auditor.md";
3484
3314
  var TRUTHMARK_COPILOT_CLAIM_VERIFIER_AGENT_PATH = ".github/agents/truth-claim-verifier.md";
3485
3315
  var TRUTHMARK_COPILOT_DOC_REVIEWER_AGENT_PATH = ".github/agents/truth-doc-reviewer.md";
3486
3316
  var TRUTHMARK_COPILOT_DOC_WRITER_AGENT_PATH = ".github/agents/truth-doc-writer.md";
3487
- var renderGeminiCommand = (description, prompt) => {
3488
- const promptWithArgs = `${prompt.trimEnd()}
3489
- User focus or arguments: {{args}}`;
3490
- return `description = "${description}"
3491
- prompt = '''
3492
- ${promptWithArgs}
3493
- '''
3494
- `;
3495
- };
3496
3317
  var renderCopilotPromptFile = (description, prompt) => {
3497
3318
  return `---
3498
3319
  agent: 'agent'
@@ -3530,105 +3351,70 @@ var renderTomlString = (value) => {
3530
3351
  var renderTomlStringArray = (values) => {
3531
3352
  return `[${values.map(renderTomlString).join(", ")}]`;
3532
3353
  };
3533
- var TRUTH_REALIZE_EXPLICIT_INVOCATIONS = "OpenCode /skill truthmark-realize; Codex /truthmark-realize or $truthmark-realize; Claude Code /truthmark-realize; GitHub Copilot /truthmark-realize; Gemini CLI /truthmark:realize.";
3534
3354
  var routeFilesHint = (config) => `${config.truthmark.paths.routesIndex}; ${config.truthmark.paths.routeAreasRoot}/`;
3535
3355
  var WORKFLOW_PACKAGE_DEFINITIONS = {
3536
3356
  "truthmark-structure": {
3537
3357
  title: "Truthmark Structure",
3538
3358
  argumentHint: "Optional area, directory, or routing concern",
3539
- invocations: TRUTH_STRUCTURE_EXPLICIT_INVOCATIONS,
3540
3359
  use: () => "Use this skill to design or repair Truthmark area structure.",
3541
3360
  quickRules: (config) => [
3542
3361
  "Follow repository instruction files that exist in this checkout; do not assume any optional policy path exists.",
3543
3362
  `Inspect .truthmark/config.yml and configured route files (${routeFilesHint(config)}) only when they exist; then inspect current docs and relevant code directly.`,
3544
3363
  "Define areas by product or behavior ownership, not by mechanical directory mirroring.",
3545
- "Do not edit functional code.",
3546
- "Read support/procedure.md before writing route or starter truth-doc changes.",
3547
- "Read support/report-template.md before the final report."
3364
+ "Do not edit functional code."
3548
3365
  ],
3549
3366
  parentRule: "Parent agent owns all Truth Structure writes and final topology decisions"
3550
3367
  },
3551
3368
  "truthmark-document": {
3552
3369
  title: "Truthmark Document",
3553
3370
  argumentHint: "Optional implemented behavior, API endpoint, route, controller, package, or truth-doc area to document",
3554
- invocations: TRUTH_DOCUMENT_EXPLICIT_INVOCATIONS,
3555
3371
  use: () => "Use this skill to document existing implemented behavior when no functional-code changes are required for the task.",
3556
3372
  quickRules: (config) => [
3557
3373
  "Follow repository instruction files that exist in this checkout; do not assume any optional policy path exists.",
3558
3374
  `Inspect .truthmark/config.yml and configured route files (${routeFilesHint(config)}) only when they exist; then inspect existing canonical docs, implementation code, and tests directly.`,
3559
3375
  "Document current implemented behavior; do not invent future behavior.",
3560
- "May write canonical truth docs and truth routing files only; must not write functional code.",
3561
- "Read support/procedure.md before editing truth docs.",
3562
- "Read support/subagents-and-leases.md only when dispatching or accepting worker output.",
3563
- "Read support/report-template.md before the final report."
3376
+ "May write canonical truth docs and truth routing files only; must not write functional code."
3564
3377
  ],
3565
3378
  parentRule: "Parent agent owns Truth Document acceptance, lease validation, and final report"
3566
3379
  },
3567
3380
  "truthmark-sync": {
3568
3381
  title: "Truthmark Sync",
3569
3382
  argumentHint: "Optional changed-code area, truth-doc area, or sync focus",
3570
- invocations: TRUTH_SYNC_EXPLICIT_INVOCATIONS,
3571
3383
  use: () => "Use this skill automatically before finishing when functional code changed since the last successful Truth Sync. Also run it immediately when the user explicitly invokes Truth Sync.",
3572
3384
  quickRules: (config) => [
3573
3385
  "Follow repository instruction files that exist in this checkout; do not assume any optional policy path exists.",
3574
3386
  "Skip docs-only, formatting-only, behavior-preserving renames with no truth impact, missing config, and no-code changes.",
3575
3387
  `Inspect .truthmark/config.yml and configured route files (${routeFilesHint(config)}) only when they exist; then inspect relevant canonical docs directly.`,
3576
3388
  "direct checkout inspection is the canonical path; do not require the truthmark binary.",
3577
- "May write canonical truth docs and truth routing files only; must not rewrite functional code.",
3578
- "Read support/procedure.md before editing truth docs.",
3579
- "Read support/subagents-and-leases.md only when dispatching or accepting worker output.",
3580
- "Read support/report-template.md before the final report."
3389
+ "May write canonical truth docs and truth routing files only; must not rewrite functional code."
3581
3390
  ],
3582
3391
  parentRule: "Parent agent owns Truth Sync acceptance, lease validation, and final report"
3583
3392
  },
3584
- "truthmark-preview": {
3585
- title: "Truthmark Preview",
3586
- argumentHint: "Optional requested outcome, code area, doc path, or routing question",
3587
- invocations: TRUTH_PREVIEW_EXPLICIT_INVOCATIONS.copilot,
3588
- use: () => "Use this skill only when the user explicitly asks to preview Truthmark routing or workflow choice before edits.",
3589
- quickRules: (config) => [
3590
- "Follow repository instruction files that exist in this checkout; do not assume any optional policy path exists.",
3591
- `Inspect .truthmark/config.yml and the root route index (${config.truthmark.paths.routesIndex}) first when present; then inspect only child route files under ${config.truthmark.paths.routeAreasRoot}/ that are relevant to the selected scope or changed paths, plus the truth docs or implementation files needed to preview ownership.`,
3592
- "Truth Preview is read-only; this report is intended, not authorized.",
3593
- "must not edit files and must not issue write leases; do not run Truth Sync automatically, replace Truth Check, claim final correctness, or mutate code.",
3594
- "Use optional read-only route-auditor evidence only when it reduces context or clarifies ownership.",
3595
- "Hand off to the selected workflow after user approval."
3596
- ],
3597
- parentRule: "Parent agent owns the final Truth Preview report"
3598
- },
3599
3393
  "truthmark-realize": {
3600
3394
  title: "Truthmark Realize",
3601
3395
  argumentHint: "Optional truth doc path, area, or desired code behavior to realize",
3602
- invocations: TRUTH_REALIZE_EXPLICIT_INVOCATIONS,
3603
3396
  use: () => "Use this skill only when the user explicitly asks to realize truth docs into code.",
3604
3397
  quickRules: (config) => [
3605
3398
  "Follow repository instruction files that exist in this checkout; do not assume any optional policy path exists.",
3606
3399
  `Read the source truth docs, inspect .truthmark/config.yml and configured route files (${routeFilesHint(config)}) only when they exist, then inspect tests and relevant functional code directly.`,
3607
3400
  "Truth docs lead; code follows.",
3608
- "may write functional code only; must not edit truth docs or truth routing while realizing those docs.",
3609
- "Read support/procedure.md before changing code.",
3610
- "Read support/report-template.md before the final report."
3401
+ "may write functional code only; must not edit truth docs or truth routing while realizing those docs."
3611
3402
  ]
3612
3403
  },
3613
3404
  "truthmark-check": {
3614
3405
  title: "Truthmark Check",
3615
3406
  argumentHint: "Optional area, doc path, or audit focus",
3616
- invocations: TRUTH_CHECK_EXPLICIT_INVOCATIONS,
3617
3407
  use: () => "Use this skill to audit repository truth health.",
3618
3408
  quickRules: (config) => [
3619
3409
  "Follow repository instruction files that exist in this checkout; do not assume any optional policy path exists.",
3620
3410
  `Inspect .truthmark/config.yml and configured route files (${routeFilesHint(config)}) only when they exist; then inspect canonical docs and relevant implementation directly.`,
3621
- "Report issues and suggested fixes; do not silently rewrite unrelated files.",
3622
- "Read support/procedure.md before auditing details.",
3623
- "Read support/subagents-and-leases.md only when dispatching verifier subagents.",
3624
- "Read support/report-template.md before the final report."
3411
+ "Report issues and suggested fixes; do not silently rewrite unrelated files."
3625
3412
  ],
3626
3413
  parentRule: "Parent agent owns the final Truth Check report"
3627
3414
  },
3628
3415
  "truthmark-portal": {
3629
3416
  title: "Truthmark Portal",
3630
3417
  argumentHint: "Optional portal generation focus",
3631
- invocations: TRUTHMARK_PORTAL_EXPLICIT_INVOCATIONS,
3632
3418
  use: () => "Use this skill only when the user explicitly asks to generate or refresh the committed static HTML Truthmark Portal.",
3633
3419
  quickRules: (config) => [
3634
3420
  "Follow repository instruction files that exist in this checkout; do not assume any optional policy path exists.",
@@ -3638,9 +3424,7 @@ var WORKFLOW_PACKAGE_DEFINITIONS = {
3638
3424
  "Generate committed, generated non-canonical static files for humans.",
3639
3425
  `Write only under fixed Portal output ${config.truthmark.paths.portalOutput}.`,
3640
3426
  `Use determined Portal template ${config.truthmark.paths.portalTemplate} when present; no .truthmark/index.json dependency.`,
3641
- "Use no remote dependencies by default and include source provenance on every page.",
3642
- "Read support/procedure.md before generating Portal output.",
3643
- "Read support/report-template.md before the final report."
3427
+ "Use no remote dependencies by default and include source provenance on every page."
3644
3428
  ]
3645
3429
  }
3646
3430
  };
@@ -3668,14 +3452,14 @@ ${renderMarkdownExample(
3668
3452
  changedCode: ["src/auth/session.ts"],
3669
3453
  syncIntent: {
3670
3454
  changedCodeReviewed: ["src/auth/session.ts"],
3671
- affectedRouteOrTruthOwner: [config.truthmark.paths.routesIndex],
3672
- targetTruthDocs: [
3673
- `${engineeringTruthRoot}/repository/bootstrap-routing.md`
3455
+ affectedRouteOrTruthOwner: [
3456
+ `${config.truthmark.paths.routeAreasRoot}/authentication.md`
3674
3457
  ],
3458
+ targetTruthDocs: [`${engineeringTruthRoot}/behaviors/session-timeout.md`],
3675
3459
  intendedUpdate: ["Update session timeout behavior."],
3676
3460
  evidenceToVerify: [
3677
3461
  "src/auth/session.ts:12",
3678
- `${config.truthmark.paths.routesIndex}:11`
3462
+ `${config.truthmark.paths.routeAreasRoot}/authentication.md:11`
3679
3463
  ],
3680
3464
  userProvidedDecisionRationale: [
3681
3465
  "User rationale: session timeout behavior changed for internal implementation consistency"
@@ -3683,22 +3467,22 @@ ${renderMarkdownExample(
3683
3467
  noUpdateNeededRationale: ["not applicable; mapped truth is stale"],
3684
3468
  blockers: ["none"]
3685
3469
  },
3686
- ownershipReviewed: [config.truthmark.paths.routesIndex],
3687
- truthDocsUpdated: [
3688
- `${engineeringTruthRoot}/repository/bootstrap-routing.md`
3470
+ ownershipReviewed: [
3471
+ `${config.truthmark.paths.routeAreasRoot}/authentication.md`
3689
3472
  ],
3473
+ truthDocsUpdated: [`${engineeringTruthRoot}/behaviors/session-timeout.md`],
3690
3474
  evidenceChecked: [
3691
3475
  {
3692
- claim: "Session timeout behavior is documented in the mapped repository truth doc.",
3476
+ claim: "Session timeout behavior is documented in the bounded authentication behavior truth doc.",
3693
3477
  evidence: [
3694
3478
  "src/auth/session.ts:12",
3695
- `${config.truthmark.paths.routesIndex}:11`
3479
+ `${config.truthmark.paths.routeAreasRoot}/authentication.md:11`
3696
3480
  ],
3697
3481
  result: "supported"
3698
3482
  }
3699
3483
  ],
3700
3484
  decisionRationaleCaptured: [
3701
- "Placed user rationale in the mapped engineering truth doc under Engineering Decisions/Rationale."
3485
+ "Placed user rationale in the bounded authentication behavior truth doc under Engineering Decisions/Rationale."
3702
3486
  ],
3703
3487
  notes: ["Updated session timeout behavior."]
3704
3488
  })
@@ -3706,16 +3490,14 @@ ${renderMarkdownExample(
3706
3490
  Blocked report example:
3707
3491
  ${renderMarkdownExample(
3708
3492
  renderTruthSyncBlockedReport({
3709
- reason: "routing repair is not allowed",
3710
- manualReviewFiles: [config.truthmark.paths.routesIndex],
3711
- nextAction: "update routing metadata and rerun Truth Sync"
3493
+ reason: "Changed code maps only to the provisional bootstrap route.",
3494
+ manualReviewFiles: [
3495
+ "src/auth/**",
3496
+ `${config.truthmark.paths.routeAreasRoot}/${config.truthmark.routes.defaultArea}.md`
3497
+ ],
3498
+ nextAction: "Run Truth Structure for src/auth/** before updating behavior truth."
3712
3499
  })
3713
3500
  )}`;
3714
- case "truthmark-preview":
3715
- return `Report completion in this shape:
3716
- ${renderMarkdownExample(
3717
- renderTruthPreviewReportExample(config)
3718
- )}`;
3719
3501
  case "truthmark-realize":
3720
3502
  return `Report completion in this shape:
3721
3503
 
@@ -3785,8 +3567,6 @@ var renderWorkflowProcedure = (workflowId, config) => {
3785
3567
  return renderTruthDocumentProcedureBody(config);
3786
3568
  case "truthmark-sync":
3787
3569
  return renderTruthSyncProcedureBody(config);
3788
- case "truthmark-preview":
3789
- return renderTruthPreviewProcedureBody(config);
3790
3570
  case "truthmark-realize":
3791
3571
  return renderTruthmarkRealizeProcedureBody(config);
3792
3572
  case "truthmark-check":
@@ -3811,7 +3591,7 @@ var renderWorkflowEntrypoint = (workflowId, config, supportFiles, host) => {
3811
3591
  return "available when relevant to the current step";
3812
3592
  };
3813
3593
  const supportFileList = supportFiles.map((supportFile) => `- ${supportFile} \u2014 ${supportFileUsage(supportFile)}`).join("\n");
3814
- const hostUsage = host === "github-copilot" ? "Use as a Copilot agent skill. Prompt files remain available under `.github/prompts/` for command-style invocation in supported Copilot IDEs." : host === "gemini-cli" ? "Use as a Gemini CLI Agent Skill; commands remain available under `/truthmark:*` for command-first invocation." : void 0;
3594
+ const hostUsage = host === "github-copilot" ? "Use as a Copilot agent skill. Prompt files remain available under `.github/prompts/` for command-style invocation in supported Copilot IDEs." : host === "cursor" ? "Use as a Cursor Agent Skill. Cursor discovers project skills under `.cursor/skills/`, selects them from the description when relevant, and supports manual `/` invocation." : void 0;
3815
3595
  return `---
3816
3596
  name: ${workflowId}
3817
3597
  description: ${workflow.description}
@@ -3825,8 +3605,6 @@ ${definition.use(config)}${hostUsage === void 0 ? "" : `
3825
3605
 
3826
3606
  ${hostUsage}`}
3827
3607
 
3828
- Invocations: ${definition.invocations}
3829
-
3830
3608
  Quick procedure:
3831
3609
  ${definition.quickRules(config).map((rule) => `- ${rule}`).join("\n")}
3832
3610
 
@@ -3870,12 +3648,8 @@ var renderWorkflowSubagentSupport = (workflowId, host) => {
3870
3648
  definition.parentRule,
3871
3649
  writeAgents
3872
3650
  );
3873
- case "gemini-cli":
3874
- return renderGeminiSubagentModeSection(
3875
- readAgents,
3876
- definition.parentRule,
3877
- writeAgents
3878
- );
3651
+ case "cursor":
3652
+ return void 0;
3879
3653
  }
3880
3654
  };
3881
3655
  var renderTruthmarkSkillPackage = ({
@@ -3891,7 +3665,11 @@ var renderTruthmarkSkillPackage = ({
3891
3665
  config
3892
3666
  );
3893
3667
  const subagents = renderWorkflowSubagentSupport(workflowId, host);
3894
- const supportFiles = workflowSupportFiles(workflowId);
3668
+ const supportFiles = [
3669
+ "support/procedure.md",
3670
+ "support/report-template.md",
3671
+ ...subagents !== void 0 ? ["support/subagents-and-leases.md"] : []
3672
+ ];
3895
3673
  const definition = WORKFLOW_PACKAGE_DEFINITIONS[workflowId];
3896
3674
  const files = [
3897
3675
  {
@@ -3952,7 +3730,7 @@ var renderOpenCodeWriterEditAllowRules = (config) => {
3952
3730
  return [...new Set(allowedPatterns)].map((pattern) => ` ${JSON.stringify(pattern)}: allow`).join("\n");
3953
3731
  };
3954
3732
  var READ_ONLY_SUBAGENT_CONTEXT_BOUNDARY = `Context boundary:
3955
- Do not preload AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, or repo-wide policy docs unless the parent explicitly assigns them as evidence.
3733
+ Do not preload AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, .cursor/skills, .antigravity/rules, or repo-wide policy docs unless the parent explicitly assigns them as evidence.
3956
3734
  Use only the parent-assigned shard plus required checkout evidence files.
3957
3735
  Return findings only; the parent workflow owns repository-policy interpretation, final decisions, and all writes.`;
3958
3736
  var renderReadOnlySubagentInstructions = (instructions) => {
@@ -4087,45 +3865,6 @@ tools: [read, search, edit]
4087
3865
 
4088
3866
  # Truthmark-managed generated file. Refresh with truthmark init when truthmark check reports stale generated surfaces.
4089
3867
 
4090
- ${instructions}
4091
- `;
4092
- };
4093
- var renderGeminiReadOnlyAgent = ({
4094
- copilotName,
4095
- description,
4096
- instructions
4097
- }) => {
4098
- const agentInstructions = renderReadOnlySubagentInstructions(instructions);
4099
- return `---
4100
- name: ${copilotName}
4101
- description: ${description}
4102
- kind: local
4103
- tools: [read_file, grep_search]
4104
- ---
4105
-
4106
- # Truthmark-managed generated file. Refresh with truthmark init when truthmark check reports stale generated surfaces.
4107
-
4108
- Manual invocation: @${copilotName}
4109
-
4110
- ${agentInstructions}
4111
- `;
4112
- };
4113
- var renderGeminiWriteAgent = ({
4114
- copilotName,
4115
- description,
4116
- instructions
4117
- }) => {
4118
- return `---
4119
- name: ${copilotName}
4120
- description: ${description}
4121
- kind: local
4122
- tools: [read_file, grep_search, write_file]
4123
- ---
4124
-
4125
- # Truthmark-managed generated file. Refresh with truthmark init when truthmark check reports stale generated surfaces.
4126
-
4127
- Manual invocation: @${copilotName} with an explicit parent write lease.
4128
-
4129
3868
  ${instructions}
4130
3869
  `;
4131
3870
  };
@@ -4228,26 +3967,6 @@ var renderTruthmarkCopilotDocWriterAgent = () => {
4228
3967
  TRUTHMARK_WRITE_SUBAGENT_PROFILES.truth_doc_writer
4229
3968
  );
4230
3969
  };
4231
- var renderTruthmarkGeminiRouteAuditorAgent = () => {
4232
- return renderGeminiReadOnlyAgent(
4233
- TRUTHMARK_SUBAGENT_PROFILES.truth_route_auditor
4234
- );
4235
- };
4236
- var renderTruthmarkGeminiClaimVerifierAgent = () => {
4237
- return renderGeminiReadOnlyAgent(
4238
- TRUTHMARK_SUBAGENT_PROFILES.truth_claim_verifier
4239
- );
4240
- };
4241
- var renderTruthmarkGeminiDocReviewerAgent = () => {
4242
- return renderGeminiReadOnlyAgent(
4243
- TRUTHMARK_SUBAGENT_PROFILES.truth_doc_reviewer
4244
- );
4245
- };
4246
- var renderTruthmarkGeminiDocWriterAgent = () => {
4247
- return renderGeminiWriteAgent(
4248
- TRUTHMARK_WRITE_SUBAGENT_PROFILES.truth_doc_writer
4249
- );
4250
- };
4251
3970
  var renderTruthmarkClaudeRouteAuditorAgent = () => {
4252
3971
  return renderClaudeReadOnlyAgent(
4253
3972
  TRUTHMARK_SUBAGENT_PROFILES.truth_route_auditor
@@ -4414,8 +4133,6 @@ var renderTruthmarkRealizeProcedureBody = (config = defaultAgentConfig()) => {
4414
4133
 
4415
4134
  Use this skill only when the user explicitly asks to realize truth docs into code.
4416
4135
 
4417
- Invocations: OpenCode /skill truthmark-realize; Codex /truthmark-realize or $truthmark-realize; Claude Code /truthmark-realize; GitHub Copilot /truthmark-realize; Gemini CLI /truthmark:realize.
4418
-
4419
4136
  Truth Realize is doc-first:
4420
4137
 
4421
4138
  - truth docs lead
@@ -4485,17 +4202,41 @@ truthmark:
4485
4202
  refresh_command: "truthmark init"
4486
4203
  `;
4487
4204
  };
4488
- var renderGeminiWorkflowCommand = (workflowId, root) => {
4205
+ var renderWorkflowRuleFile = ({
4206
+ workflowId,
4207
+ hostName,
4208
+ ruleName,
4209
+ config = defaultAgentConfig()
4210
+ }) => {
4489
4211
  const workflow = getTruthmarkWorkflow(workflowId);
4490
- return renderGeminiCommand(
4491
- workflow.description,
4492
- renderWorkflowCommandAdapterInstructions(
4493
- workflowId,
4494
- root,
4495
- "Gemini CLI",
4496
- "command"
4497
- )
4212
+ const definition = WORKFLOW_PACKAGE_DEFINITIONS[workflowId];
4213
+ const { procedure, reportTemplate } = renderWorkflowSupportParts(
4214
+ workflowId,
4215
+ config
4498
4216
  );
4217
+ const body = `# ${definition.title}
4218
+
4219
+ Truthmark-managed generated file. Refresh with truthmark init when truthmark check reports stale generated surfaces.
4220
+
4221
+ This rule is the ${hostName} entrypoint for ${definition.title}.
4222
+
4223
+ Do not invoke another Truthmark command from here.
4224
+
4225
+ Manual invocation: @${ruleName}
4226
+
4227
+ If skill entrypoints are unavailable, use the host's direct evidence-first manual fallback procedure.
4228
+
4229
+ Description: ${workflow.description}
4230
+
4231
+ ## Procedure
4232
+
4233
+ ${procedure}
4234
+
4235
+ ## Report Template
4236
+
4237
+ ${reportTemplate}
4238
+ `;
4239
+ return body;
4499
4240
  };
4500
4241
  var renderCopilotWorkflowPrompt = (workflowId, root) => {
4501
4242
  const workflow = getTruthmarkWorkflow(workflowId);
@@ -4509,60 +4250,42 @@ var renderCopilotWorkflowPrompt = (workflowId, root) => {
4509
4250
  )
4510
4251
  );
4511
4252
  };
4512
- var renderTruthmarkGeminiStructureCommand = (config = defaultAgentConfig()) => {
4513
- void config;
4514
- return renderGeminiWorkflowCommand(
4515
- "truthmark-structure",
4516
- ".gemini/skills/truthmark-structure"
4517
- );
4518
- };
4519
- var renderTruthmarkGeminiDocumentCommand = (config = defaultAgentConfig()) => {
4520
- void config;
4521
- return renderGeminiWorkflowCommand(
4522
- "truthmark-document",
4523
- ".gemini/skills/truthmark-document"
4524
- );
4525
- };
4526
- var renderTruthmarkGeminiSyncCommand = (config = defaultAgentConfig()) => {
4527
- void config;
4528
- return renderGeminiWorkflowCommand(
4529
- "truthmark-sync",
4530
- ".gemini/skills/truthmark-sync"
4531
- );
4532
- };
4533
- var renderTruthmarkGeminiRealizeCommand = (config = defaultAgentConfig()) => {
4534
- void config;
4535
- return renderGeminiWorkflowCommand(
4536
- "truthmark-realize",
4537
- ".gemini/skills/truthmark-realize"
4538
- );
4539
- };
4540
- var renderTruthmarkGeminiCheckCommand = (config = defaultAgentConfig()) => {
4541
- void config;
4542
- return renderGeminiWorkflowCommand(
4543
- "truthmark-check",
4544
- ".gemini/skills/truthmark-check"
4545
- );
4546
- };
4547
- var renderTruthmarkGeminiPreviewCommand = (config = defaultAgentConfig()) => {
4548
- const workflow = getTruthmarkWorkflow("truthmark-preview");
4549
- return renderGeminiCommand(
4550
- workflow.description,
4551
- `This command is the Gemini CLI entrypoint for Truthmark Preview.
4552
-
4553
- Truth Preview is read-only and explicit. Do not invoke another Truthmark command from here.
4554
-
4555
- ${renderTruthPreviewProcedureBody(config, "gemini")}
4556
- ${renderTruthPreviewAdapterReportFields()}`
4557
- );
4558
- };
4559
- var renderTruthmarkGeminiPortalCommand = (config = defaultAgentConfig()) => {
4560
- void config;
4561
- return renderGeminiWorkflowCommand(
4562
- "truthmark-portal",
4563
- ".gemini/skills/truthmark-portal"
4564
- );
4565
- };
4253
+ var renderTruthmarkAntigravityStructureRule = (config = defaultAgentConfig()) => renderWorkflowRuleFile({
4254
+ workflowId: "truthmark-structure",
4255
+ hostName: "Antigravity",
4256
+ ruleName: "truthmark-structure",
4257
+ config
4258
+ });
4259
+ var renderTruthmarkAntigravityDocumentRule = (config = defaultAgentConfig()) => renderWorkflowRuleFile({
4260
+ workflowId: "truthmark-document",
4261
+ hostName: "Antigravity",
4262
+ ruleName: "truthmark-document",
4263
+ config
4264
+ });
4265
+ var renderTruthmarkAntigravitySyncRule = (config = defaultAgentConfig()) => renderWorkflowRuleFile({
4266
+ workflowId: "truthmark-sync",
4267
+ hostName: "Antigravity",
4268
+ ruleName: "truthmark-sync",
4269
+ config
4270
+ });
4271
+ var renderTruthmarkAntigravityRealizeRule = (config = defaultAgentConfig()) => renderWorkflowRuleFile({
4272
+ workflowId: "truthmark-realize",
4273
+ hostName: "Antigravity",
4274
+ ruleName: "truthmark-realize",
4275
+ config
4276
+ });
4277
+ var renderTruthmarkAntigravityCheckRule = (config = defaultAgentConfig()) => renderWorkflowRuleFile({
4278
+ workflowId: "truthmark-check",
4279
+ hostName: "Antigravity",
4280
+ ruleName: "truthmark-check",
4281
+ config
4282
+ });
4283
+ var renderTruthmarkAntigravityPortalRule = (config = defaultAgentConfig()) => renderWorkflowRuleFile({
4284
+ workflowId: "truthmark-portal",
4285
+ hostName: "Antigravity",
4286
+ ruleName: "truthmark-portal",
4287
+ config
4288
+ });
4566
4289
  var renderTruthmarkCopilotStructurePrompt = (config = defaultAgentConfig()) => {
4567
4290
  void config;
4568
4291
  return renderCopilotWorkflowPrompt(
@@ -4598,18 +4321,6 @@ var renderTruthmarkCopilotCheckPrompt = (config = defaultAgentConfig()) => {
4598
4321
  ".github/skills/truthmark-check"
4599
4322
  );
4600
4323
  };
4601
- var renderTruthmarkCopilotPreviewPrompt = (config = defaultAgentConfig()) => {
4602
- const workflow = getTruthmarkWorkflow("truthmark-preview");
4603
- return renderCopilotPromptFile(
4604
- workflow.description,
4605
- `This prompt is the GitHub Copilot entrypoint for Truthmark Preview.
4606
-
4607
- Truth Preview is read-only and explicit. Do not invoke another Truthmark command from here.
4608
-
4609
- ${renderTruthPreviewProcedureBody(config, "copilot")}
4610
- ${renderTruthPreviewAdapterReportFields()}`
4611
- );
4612
- };
4613
4324
  var renderTruthmarkCopilotPortalPrompt = (config = defaultAgentConfig()) => {
4614
4325
  void config;
4615
4326
  return renderCopilotWorkflowPrompt(
@@ -4872,10 +4583,6 @@ var copilotFiles = (config, block) => {
4872
4583
  path: TRUTHMARK_COPILOT_SYNC_PROMPT_PATH,
4873
4584
  content: renderTruthmarkCopilotSyncPrompt(config)
4874
4585
  },
4875
- {
4876
- path: TRUTHMARK_COPILOT_PREVIEW_PROMPT_PATH,
4877
- content: renderTruthmarkCopilotPreviewPrompt(config)
4878
- },
4879
4586
  {
4880
4587
  path: TRUTHMARK_COPILOT_CHECK_PROMPT_PATH,
4881
4588
  content: renderTruthmarkCopilotCheckPrompt(config)
@@ -4917,92 +4624,78 @@ var copilotFiles = (config, block) => {
4917
4624
  }
4918
4625
  return files;
4919
4626
  };
4920
- var geminiFiles = (config, block) => {
4627
+ var antigravityFiles = (config) => {
4628
+ const files = [
4629
+ {
4630
+ path: TRUTHMARK_ANTIGRAVITY_STRUCTURE_RULE_PATH,
4631
+ content: renderTruthmarkAntigravityStructureRule(config)
4632
+ },
4633
+ {
4634
+ path: TRUTHMARK_ANTIGRAVITY_DOCUMENT_RULE_PATH,
4635
+ content: renderTruthmarkAntigravityDocumentRule(config)
4636
+ },
4637
+ {
4638
+ path: TRUTHMARK_ANTIGRAVITY_SYNC_RULE_PATH,
4639
+ content: renderTruthmarkAntigravitySyncRule(config)
4640
+ },
4641
+ {
4642
+ path: TRUTHMARK_ANTIGRAVITY_CHECK_RULE_PATH,
4643
+ content: renderTruthmarkAntigravityCheckRule(config)
4644
+ },
4645
+ {
4646
+ path: TRUTHMARK_ANTIGRAVITY_REALIZE_RULE_PATH,
4647
+ content: renderTruthmarkAntigravityRealizeRule(config)
4648
+ }
4649
+ ];
4650
+ if (config.truthmark.generated.portal.enabled) {
4651
+ files.push({
4652
+ path: TRUTHMARK_ANTIGRAVITY_PORTAL_RULE_PATH,
4653
+ content: renderTruthmarkAntigravityPortalRule(config)
4654
+ });
4655
+ }
4656
+ return files;
4657
+ };
4658
+ var cursorFiles = (config) => {
4921
4659
  const files = [
4922
- ...instructionBlockFiles(["GEMINI.md"], block),
4923
4660
  ...renderTruthmarkSkillPackage({
4924
- skillPath: ".gemini/skills/truthmark-structure/SKILL.md",
4661
+ skillPath: TRUTHMARK_CURSOR_STRUCTURE_SKILL_PATH,
4925
4662
  workflowId: "truthmark-structure",
4926
- host: "gemini-cli",
4663
+ host: "cursor",
4927
4664
  config
4928
4665
  }),
4929
4666
  ...renderTruthmarkSkillPackage({
4930
- skillPath: ".gemini/skills/truthmark-document/SKILL.md",
4667
+ skillPath: TRUTHMARK_CURSOR_DOCUMENT_SKILL_PATH,
4931
4668
  workflowId: "truthmark-document",
4932
- host: "gemini-cli",
4669
+ host: "cursor",
4933
4670
  config
4934
4671
  }),
4935
4672
  ...renderTruthmarkSkillPackage({
4936
- skillPath: ".gemini/skills/truthmark-sync/SKILL.md",
4673
+ skillPath: TRUTHMARK_CURSOR_SYNC_SKILL_PATH,
4937
4674
  workflowId: "truthmark-sync",
4938
- host: "gemini-cli",
4675
+ host: "cursor",
4939
4676
  config
4940
4677
  }),
4941
4678
  ...renderTruthmarkSkillPackage({
4942
- skillPath: ".gemini/skills/truthmark-check/SKILL.md",
4679
+ skillPath: TRUTHMARK_CURSOR_CHECK_SKILL_PATH,
4943
4680
  workflowId: "truthmark-check",
4944
- host: "gemini-cli",
4681
+ host: "cursor",
4945
4682
  config
4946
4683
  }),
4947
4684
  ...renderTruthmarkSkillPackage({
4948
- skillPath: ".gemini/skills/truthmark-realize/SKILL.md",
4685
+ skillPath: TRUTHMARK_CURSOR_REALIZE_SKILL_PATH,
4949
4686
  workflowId: "truthmark-realize",
4950
- host: "gemini-cli",
4687
+ host: "cursor",
4951
4688
  config
4952
- }),
4953
- {
4954
- path: TRUTHMARK_GEMINI_STRUCTURE_COMMAND_PATH,
4955
- content: renderTruthmarkGeminiStructureCommand(config)
4956
- },
4957
- {
4958
- path: TRUTHMARK_GEMINI_DOCUMENT_COMMAND_PATH,
4959
- content: renderTruthmarkGeminiDocumentCommand(config)
4960
- },
4961
- {
4962
- path: TRUTHMARK_GEMINI_SYNC_COMMAND_PATH,
4963
- content: renderTruthmarkGeminiSyncCommand(config)
4964
- },
4965
- {
4966
- path: TRUTHMARK_GEMINI_PREVIEW_COMMAND_PATH,
4967
- content: renderTruthmarkGeminiPreviewCommand(config)
4968
- },
4969
- {
4970
- path: TRUTHMARK_GEMINI_CHECK_COMMAND_PATH,
4971
- content: renderTruthmarkGeminiCheckCommand(config)
4972
- },
4973
- {
4974
- path: TRUTHMARK_GEMINI_REALIZE_COMMAND_PATH,
4975
- content: renderTruthmarkGeminiRealizeCommand(config)
4976
- },
4977
- {
4978
- path: TRUTHMARK_GEMINI_ROUTE_AUDITOR_AGENT_PATH,
4979
- content: renderTruthmarkGeminiRouteAuditorAgent()
4980
- },
4981
- {
4982
- path: TRUTHMARK_GEMINI_CLAIM_VERIFIER_AGENT_PATH,
4983
- content: renderTruthmarkGeminiClaimVerifierAgent()
4984
- },
4985
- {
4986
- path: TRUTHMARK_GEMINI_DOC_REVIEWER_AGENT_PATH,
4987
- content: renderTruthmarkGeminiDocReviewerAgent()
4988
- },
4989
- {
4990
- path: TRUTHMARK_GEMINI_DOC_WRITER_AGENT_PATH,
4991
- content: renderTruthmarkGeminiDocWriterAgent()
4992
- }
4689
+ })
4993
4690
  ];
4994
4691
  if (config.truthmark.generated.portal.enabled) {
4995
4692
  files.push(
4996
4693
  ...renderTruthmarkSkillPackage({
4997
- skillPath: ".gemini/skills/truthmark-portal/SKILL.md",
4694
+ skillPath: TRUTHMARK_CURSOR_PORTAL_SKILL_PATH,
4998
4695
  workflowId: "truthmark-portal",
4999
- host: "gemini-cli",
4696
+ host: "cursor",
5000
4697
  config
5001
- }),
5002
- {
5003
- path: TRUTHMARK_GEMINI_PORTAL_COMMAND_PATH,
5004
- content: renderTruthmarkGeminiPortalCommand(config)
5005
- }
4698
+ })
5006
4699
  );
5007
4700
  }
5008
4701
  return files;
@@ -5024,8 +4717,10 @@ var filesForPlatform = (platform, config, block) => {
5024
4717
  return claudeFiles(config, block);
5025
4718
  case "github-copilot":
5026
4719
  return copilotFiles(config, block);
5027
- case "gemini-cli":
5028
- return geminiFiles(config, block);
4720
+ case "antigravity":
4721
+ return antigravityFiles(config);
4722
+ case "cursor":
4723
+ return cursorFiles(config);
5029
4724
  }
5030
4725
  };
5031
4726
  var renderGeneratedSurfaces = (config, block = renderAgentsBlock(config)) => {
@@ -5070,13 +4765,31 @@ var GENERATED_HOST_SKILL_ROOTS = [
5070
4765
  ".opencode/skills",
5071
4766
  ".claude/skills",
5072
4767
  ".github/skills",
5073
- ".gemini/skills"
4768
+ ".cursor/skills"
5074
4769
  ];
5075
4770
  var RETIRED_SKILL_HELPER_PATHS = [
5076
4771
  "helper-manifest.yml",
5077
4772
  "support/helper-policy.md"
5078
4773
  ];
5079
4774
  var RETIRED_PACKAGE_DIRECTORIES = ["truthmark-preview"];
4775
+ var RETIRED_GENERATED_SURFACE_PATHS = [
4776
+ "GEMINI.md",
4777
+ ".github/prompts/truthmark-preview.prompt.md",
4778
+ ".cursor/rules/truthmark-structure.mdc",
4779
+ ".cursor/rules/truthmark-document.mdc",
4780
+ ".cursor/rules/truthmark-sync.mdc",
4781
+ ".cursor/rules/truthmark-realize.mdc",
4782
+ ".cursor/rules/truthmark-check.mdc",
4783
+ ".cursor/rules/truthmark-portal.mdc"
4784
+ ];
4785
+ var RETIRED_GENERATED_SURFACE_ROOTS = [".gemini"];
4786
+ var isRetiredGeminiSurfacePath = (filePath) => filePath === "GEMINI.md" || filePath.startsWith(".gemini/");
4787
+ var obsoleteGeneratedSurfaceMessage = (surfacePath) => {
4788
+ if (isRetiredGeminiSurfacePath(surfacePath)) {
4789
+ return `Generated surface ${surfacePath} is obsolete; remove stale Gemini instructions manually if they are no longer wanted.`;
4790
+ }
4791
+ return `Generated surface ${surfacePath} is obsolete; rerun truthmark init.`;
4792
+ };
5080
4793
  var pathExists = async (absolutePath) => {
5081
4794
  try {
5082
4795
  await fs6.access(absolutePath);
@@ -5111,8 +4824,33 @@ var listDirectoryFiles = async (rootDir, packageRoot) => {
5111
4824
  }
5112
4825
  return files;
5113
4826
  };
5114
- var collectRetiredGeneratedSurfaces = async (rootDir, expectedSurfacePaths) => {
4827
+ var collectRetiredGeneratedSurfaces = async (rootDir, expectedSurfacePaths, options = {}) => {
5115
4828
  const legacyCandidates = /* @__PURE__ */ new Set();
4829
+ const includeGeminiSurfaces = options.includeGeminiSurfaces ?? true;
4830
+ for (const retiredPath of RETIRED_GENERATED_SURFACE_PATHS) {
4831
+ if (!includeGeminiSurfaces && isRetiredGeminiSurfacePath(retiredPath)) {
4832
+ continue;
4833
+ }
4834
+ const absoluteRetiredPath = resolveRepoPath(rootDir, retiredPath);
4835
+ if (await pathExists(absoluteRetiredPath) && !expectedSurfacePaths.has(retiredPath)) {
4836
+ legacyCandidates.add(retiredPath);
4837
+ }
4838
+ }
4839
+ for (const retiredRoot of RETIRED_GENERATED_SURFACE_ROOTS) {
4840
+ if (!includeGeminiSurfaces && isRetiredGeminiSurfacePath(`${retiredRoot}/`)) {
4841
+ continue;
4842
+ }
4843
+ const absoluteRetiredRoot = resolveRepoPath(rootDir, retiredRoot);
4844
+ if (!await pathExists(absoluteRetiredRoot)) {
4845
+ continue;
4846
+ }
4847
+ const retiredFiles = await listDirectoryFiles(rootDir, retiredRoot);
4848
+ for (const filePath of retiredFiles) {
4849
+ if (!expectedSurfacePaths.has(filePath)) {
4850
+ legacyCandidates.add(filePath);
4851
+ }
4852
+ }
4853
+ }
5116
4854
  for (const skillRoot of GENERATED_HOST_SKILL_ROOTS) {
5117
4855
  const absoluteSkillRoot = resolveRepoPath(rootDir, skillRoot);
5118
4856
  let skillPackages = [];
@@ -5187,14 +4925,16 @@ var checkGeneratedSurfaces = async (rootDir, config) => {
5187
4925
  diagnostics.push({
5188
4926
  category: "generated-surface",
5189
4927
  severity: "review",
5190
- message: `Generated surface ${surfacePath} is obsolete; rerun truthmark init.`,
4928
+ message: obsoleteGeneratedSurfaceMessage(surfacePath),
5191
4929
  file: surfacePath
5192
4930
  });
5193
4931
  }
5194
4932
  return diagnostics;
5195
4933
  };
5196
- var findRetiredGeneratedSurfaces = async (rootDir, expectedSurfacePaths) => {
5197
- return collectRetiredGeneratedSurfaces(rootDir, expectedSurfacePaths);
4934
+ var findAutoRemovableRetiredGeneratedSurfaces = async (rootDir, expectedSurfacePaths) => {
4935
+ return collectRetiredGeneratedSurfaces(rootDir, expectedSurfacePaths, {
4936
+ includeGeminiSurfaces: false
4937
+ });
5198
4938
  };
5199
4939
 
5200
4940
  // src/init/init.ts
@@ -5305,21 +5045,15 @@ var diagnosticCategoryForPath = (filePath, config) => {
5305
5045
  if (filePath === "AGENTS.md") {
5306
5046
  return "truth-sync";
5307
5047
  }
5308
- if (filePath === ".github/prompts/truthmark-realize.prompt.md" || filePath.startsWith(".github/skills/truthmark-realize/") || filePath.startsWith(".claude/skills/truthmark-realize/") || filePath.startsWith(".opencode/skills/truthmark-realize/") || filePath.startsWith(".agents/skills/truthmark-realize/") || filePath.startsWith(".gemini/skills/truthmark-realize/")) {
5048
+ if (filePath === ".github/prompts/truthmark-realize.prompt.md" || filePath.startsWith(".github/skills/truthmark-realize/") || filePath.startsWith(".claude/skills/truthmark-realize/") || filePath.startsWith(".opencode/skills/truthmark-realize/") || filePath.startsWith(".agents/skills/truthmark-realize/") || filePath.startsWith(".antigravity/rules/truthmark-realize") || filePath.startsWith(".cursor/rules/truthmark-realize") || filePath.startsWith(".cursor/skills/truthmark-realize/")) {
5309
5049
  return "realization";
5310
5050
  }
5311
- if (filePath === "CLAUDE.md" || filePath === "GEMINI.md" || filePath === ".github/copilot-instructions.md" || filePath.startsWith(".github/prompts/truthmark-") || filePath.startsWith(".github/agents/truth-") || filePath.startsWith(".github/skills/truthmark-") || filePath.startsWith(".claude/agents/truth-") || filePath.startsWith(".claude/skills/truthmark-") || filePath.startsWith(".opencode/skills/truthmark-") || filePath.startsWith(".opencode/agents/") || filePath.startsWith(".codex/agents/") || filePath.startsWith(".gemini/agents/truth-") || filePath.startsWith(".gemini/skills/truthmark-")) {
5051
+ if (filePath === "CLAUDE.md" || filePath === ".github/copilot-instructions.md" || filePath.startsWith(".github/prompts/truthmark-") || filePath.startsWith(".github/agents/truth-") || filePath.startsWith(".github/skills/truthmark-") || filePath.startsWith(".claude/agents/truth-") || filePath.startsWith(".claude/skills/truthmark-") || filePath.startsWith(".opencode/skills/truthmark-") || filePath.startsWith(".opencode/agents/") || filePath.startsWith(".codex/agents/") || filePath.startsWith(".antigravity/rules/truthmark-") || filePath.startsWith(".cursor/rules/truthmark-") || filePath.startsWith(".cursor/skills/truthmark-")) {
5312
5052
  return "truth-sync";
5313
5053
  }
5314
5054
  if (filePath.startsWith(".agents/skills/truthmark-")) {
5315
5055
  return "truth-sync";
5316
5056
  }
5317
- if (filePath.startsWith(".gemini/commands/truthmark/realize")) {
5318
- return "realization";
5319
- }
5320
- if (filePath.startsWith(".gemini/commands/truthmark/")) {
5321
- return "truth-sync";
5322
- }
5323
5057
  if (filePath === config.truthmark.paths.routesIndex) {
5324
5058
  return "area-index";
5325
5059
  }
@@ -5376,7 +5110,7 @@ var runInit = async (cwd) => {
5376
5110
  for (const file of platformFiles) {
5377
5111
  results.push(await writePlatformFile(rootDir, file));
5378
5112
  }
5379
- const obsoleteSurfacePaths = await findRetiredGeneratedSurfaces(
5113
+ const obsoleteSurfacePaths = await findAutoRemovableRetiredGeneratedSurfaces(
5380
5114
  rootDir,
5381
5115
  expectedSurfacePaths
5382
5116
  );
@@ -6162,7 +5896,7 @@ var classifyPath = (filePath, ignorePatterns) => {
6162
5896
  if (normalizedPath.startsWith(".truthmark/")) {
6163
5897
  return "derived";
6164
5898
  }
6165
- if (normalizedPath.startsWith(".agents/skills/truthmark-") || normalizedPath.startsWith(".claude/") || normalizedPath.startsWith(".codex/") || normalizedPath.startsWith(".gemini/agents/truth-") || normalizedPath.startsWith(".gemini/commands/") || normalizedPath.startsWith(".gemini/skills/truthmark-") || normalizedPath.startsWith(".opencode/") || normalizedPath === ".github/copilot-instructions.md" || normalizedPath.startsWith(".github/agents/truth-") || normalizedPath.startsWith(".github/prompts/truthmark-") || normalizedPath.startsWith(".github/skills/truthmark-") || normalizedPath === "AGENTS.md" || normalizedPath === "CLAUDE.md" || normalizedPath === "GEMINI.md" || normalizedPath.startsWith(".gemini/commands/truthmark/")) {
5899
+ if (normalizedPath.startsWith(".agents/skills/truthmark-") || normalizedPath.startsWith(".claude/") || normalizedPath.startsWith(".codex/") || normalizedPath.startsWith(".opencode/") || normalizedPath.startsWith(".antigravity/rules/truthmark-") || normalizedPath.startsWith(".cursor/rules/truthmark-") || normalizedPath.startsWith(".cursor/skills/truthmark-") || normalizedPath === ".github/copilot-instructions.md" || normalizedPath.startsWith(".github/agents/truth-") || normalizedPath.startsWith(".github/prompts/truthmark-") || normalizedPath.startsWith(".github/skills/truthmark-") || normalizedPath === "AGENTS.md" || normalizedPath === "CLAUDE.md") {
6166
5900
  return "derived";
6167
5901
  }
6168
5902
  if (ignorePatterns.length > 0 && micromatch3.isMatch(normalizedPath, ignorePatterns)) {
@@ -7808,6 +7542,7 @@ var runCheck = async (cwd, options = {}) => {
7808
7542
 
7809
7543
  // src/workflow-state/build.ts
7810
7544
  import { execa as execa5 } from "execa";
7545
+ import micromatch8 from "micromatch";
7811
7546
 
7812
7547
  // src/workflow-state/action-context.ts
7813
7548
  var uniqueSorted3 = (values) => [...new Set(values.filter((value) => value.length > 0))].sort();
@@ -7841,7 +7576,7 @@ var baseContext = (manifestEntry, mode, allowedWritePaths, routeFiles, primaryTr
7841
7576
  writeLeaseRequired
7842
7577
  });
7843
7578
  var buildWorkflowActionContext = (manifestEntry, data = {}) => {
7844
- if (manifestEntry.id === "truthmark-preview" || manifestEntry.id === "truthmark-check") {
7579
+ if (manifestEntry.id === "truthmark-check") {
7845
7580
  return baseContext(manifestEntry, "read-only", [], [], [], [], [], false);
7846
7581
  }
7847
7582
  if (manifestEntry.id === "truthmark-sync" || manifestEntry.id === "truthmark-document") {
@@ -7917,7 +7652,7 @@ var helperCommandsFor2 = (workflow) => (TRUTHMARK_WORKFLOW_MANIFEST[workflow].he
7917
7652
  optional: helper.optional
7918
7653
  }));
7919
7654
  var uniqueSorted4 = (values) => [...new Set(values.filter((value) => value.length > 0))].sort();
7920
- var isWriteCapable = (workflow) => !["truthmark-preview", "truthmark-check"].includes(workflow);
7655
+ var isWriteCapable = (workflow) => workflow !== "truthmark-check";
7921
7656
  var DEFAULT_BASE_CANDIDATES = [
7922
7657
  "@{upstream}",
7923
7658
  "origin/main",
@@ -7945,9 +7680,67 @@ var selectComparisonBase = async (rootDir, suppliedBase) => {
7945
7680
  return null;
7946
7681
  };
7947
7682
  var routeFilesFor = (repoIndex) => uniqueSorted4(repoIndex.routeMap.routes.map((route) => route.sourcePath));
7948
- var candidateStaleTruthDocsFor = (indexedTruthDocs, primaryTruthDocs) => {
7683
+ var candidateStaleTruthDocsFor = (repoIndex, primaryTruthDocs, impactSet, diagnostics) => {
7684
+ const indexedTruthDocs = new Set(
7685
+ repoIndex.routeMap.routes.flatMap((route) => route.truthDocs)
7686
+ );
7949
7687
  const primary = new Set(primaryTruthDocs);
7950
- return indexedTruthDocs.filter((truthDoc) => !primary.has(truthDoc));
7688
+ const candidates = /* @__PURE__ */ new Set();
7689
+ const changedPaths = new Set(
7690
+ (impactSet?.changedFiles ?? []).flatMap((file) => [
7691
+ file.path,
7692
+ ...file.previousPath ? [file.previousPath] : []
7693
+ ])
7694
+ );
7695
+ const docEntries = new Map(
7696
+ repoIndex.routeMap.routes.flatMap((route) => route.truthDocumentEntries).map((entry) => [entry.path, entry])
7697
+ );
7698
+ const addCandidate = (truthDoc) => {
7699
+ if (indexedTruthDocs.has(truthDoc) && !primary.has(truthDoc)) {
7700
+ candidates.add(truthDoc);
7701
+ }
7702
+ };
7703
+ const linkedTruthDocs = (truthDoc) => {
7704
+ const entry = docEntries.get(truthDoc);
7705
+ return uniqueSorted4([
7706
+ ...entry?.realizedBy ?? [],
7707
+ ...entry?.realizes ?? [],
7708
+ ...entry?.dependsOn ?? [],
7709
+ ...[...docEntries.values()].filter(
7710
+ (candidate) => candidate.realizedBy.includes(truthDoc) || candidate.realizes.includes(truthDoc) || candidate.dependsOn.includes(truthDoc)
7711
+ ).map((candidate) => candidate.path)
7712
+ ]);
7713
+ };
7714
+ for (const truthDoc of [...primary, ...changedPaths].filter(
7715
+ (path12) => indexedTruthDocs.has(path12)
7716
+ )) {
7717
+ for (const linkedTruthDoc of linkedTruthDocs(truthDoc)) {
7718
+ addCandidate(linkedTruthDoc);
7719
+ }
7720
+ }
7721
+ for (const diagnostic of diagnostics) {
7722
+ if (diagnostic.category === "freshness" && diagnostic.file) {
7723
+ addCandidate(diagnostic.file);
7724
+ }
7725
+ }
7726
+ for (const route of repoIndex.routeMap.routes) {
7727
+ if (changedPaths.has(route.sourcePath)) {
7728
+ route.truthDocs.forEach(addCandidate);
7729
+ }
7730
+ }
7731
+ for (const doc of repoIndex.docs) {
7732
+ if (!indexedTruthDocs.has(doc.path) || primary.has(doc.path)) {
7733
+ continue;
7734
+ }
7735
+ if (doc.sourceOfTruth.some(
7736
+ (reference) => [...changedPaths].some(
7737
+ (changedPath) => reference === changedPath || micromatch8.isMatch(changedPath, reference)
7738
+ )
7739
+ )) {
7740
+ candidates.add(doc.path);
7741
+ }
7742
+ }
7743
+ return uniqueSorted4([...candidates]);
7951
7744
  };
7952
7745
  var hasUnmappedFunctionalChange = (impactSet) => impactSet?.diagnostics.some(
7953
7746
  (diagnostic) => diagnostic.category === "impact" && /not mapped to a Truthmark route|no affected truth document/u.test(
@@ -8013,7 +7806,7 @@ var workflowCardFor = (workflow, applicability, diagnostics, impactSet) => {
8013
7806
  }))
8014
7807
  };
8015
7808
  };
8016
- var contextDataFor = (workflow, repoIndex, config, impactSet) => {
7809
+ var contextDataFor = (workflow, repoIndex, config, impactSet, diagnostics) => {
8017
7810
  if (!config) {
8018
7811
  return {};
8019
7812
  }
@@ -8022,7 +7815,12 @@ var contextDataFor = (workflow, repoIndex, config, impactSet) => {
8022
7815
  repoIndex.routeMap.routes.flatMap((route) => route.truthDocs)
8023
7816
  );
8024
7817
  const primaryTruthDocs = uniqueSorted4(impactSet?.affectedTruthDocs ?? []);
8025
- const candidateStaleTruthDocs = workflow === "truthmark-sync" ? candidateStaleTruthDocsFor(indexedTruthDocs, primaryTruthDocs) : [];
7818
+ const candidateStaleTruthDocs = workflow === "truthmark-sync" ? candidateStaleTruthDocsFor(
7819
+ repoIndex,
7820
+ primaryTruthDocs,
7821
+ impactSet,
7822
+ diagnostics
7823
+ ) : [];
8026
7824
  const truthDocs = workflow === "truthmark-sync" ? uniqueSorted4([...primaryTruthDocs, ...candidateStaleTruthDocs]) : uniqueSorted4(impactSet?.affectedTruthDocs ?? indexedTruthDocs);
8027
7825
  return {
8028
7826
  routeIndexPath: config.truthmark.paths.routesIndex,
@@ -8082,7 +7880,8 @@ var buildWorkflowState = async (cwd, options) => {
8082
7880
  options.workflow,
8083
7881
  repoIndex,
8084
7882
  loadResult.config,
8085
- impactSet
7883
+ impactSet,
7884
+ diagnostics
8086
7885
  );
8087
7886
  return {
8088
7887
  schemaVersion: "truthmark-workflow/v0",
@@ -8237,6 +8036,16 @@ var validateTruthSyncReportText = (text) => {
8237
8036
  "Evidence checked entries include Claim:, Evidence:, and Result: supported | narrowed | removed | blocked"
8238
8037
  );
8239
8038
  }
8039
+ const completedTargets = [
8040
+ ...report.truthDocsUpdated,
8041
+ ...report.syncIntent?.targetTruthDocs ?? []
8042
+ ];
8043
+ const bootstrapTargets = completedTargets.filter(isBootstrapRoutingDocPath);
8044
+ if (bootstrapTargets.length > 0) {
8045
+ errors.push(
8046
+ `bootstrap-routing.md is a provisional topology handoff, not a completed behavior-update target: ${bootstrapTargets.join(", ")}`
8047
+ );
8048
+ }
8240
8049
  if (report.syncIntent !== void 0) {
8241
8050
  checks.push("Sync Intent");
8242
8051
  }
@@ -8295,6 +8104,7 @@ var validateTruthDocumentReportText = (text) => {
8295
8104
  };
8296
8105
  var cleanPathValue = (value) => value.trim().replace(/^["']|["']$/gu, "");
8297
8106
  var normalizePath5 = (value) => cleanPathValue(value).replace(/^\.\//u, "");
8107
+ var isBootstrapRoutingDocPath = (value) => normalizePath5(value).endsWith("/bootstrap-routing.md");
8298
8108
  var windowsDriveAbsolutePattern = /^[A-Za-z]:[\\/]/u;
8299
8109
  var uncPathPattern = /^[/\\]{2}[^/\\]+[/\\]+[^/\\]+/u;
8300
8110
  var isUnsafePathValue = (value) => {