@ontrails/trails 1.0.0-beta.39 → 1.0.0-beta.41

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 (58) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/README.md +1 -1
  3. package/package.json +17 -17
  4. package/src/app.ts +4 -4
  5. package/src/cli.ts +1 -1
  6. package/src/completions.ts +1 -1
  7. package/src/mcp-app.ts +2 -2
  8. package/src/regrade/history.ts +148 -38
  9. package/src/regrade/plan-artifact.ts +31 -11
  10. package/src/release/native-bun-registry.ts +12 -1
  11. package/src/release/policy.ts +4 -1
  12. package/src/retired-topo-command.ts +1 -1
  13. package/src/run-watch.ts +1 -1
  14. package/src/run-wayfind-outline.ts +6 -2
  15. package/src/trails/adapter-check.ts +8 -8
  16. package/src/trails/add-surface.ts +2 -2
  17. package/src/trails/add-trail.ts +3 -3
  18. package/src/trails/add-verify.ts +2 -2
  19. package/src/trails/compile.ts +9 -9
  20. package/src/trails/completions-complete.ts +10 -10
  21. package/src/trails/completions.ts +2 -2
  22. package/src/trails/create-adapter.ts +185 -424
  23. package/src/trails/create-scaffold.ts +12 -12
  24. package/src/trails/create-versions.ts +8 -8
  25. package/src/trails/create.ts +35 -35
  26. package/src/trails/deprecate.ts +2 -2
  27. package/src/trails/dev-clean.ts +11 -11
  28. package/src/trails/dev-reset.ts +11 -11
  29. package/src/trails/dev-stats.ts +8 -8
  30. package/src/trails/dev-support.ts +1 -1
  31. package/src/trails/doctor.ts +4 -4
  32. package/src/trails/draft-promote.ts +3 -3
  33. package/src/trails/guide.ts +9 -9
  34. package/src/trails/load-app.ts +3 -3
  35. package/src/trails/regrade.ts +56 -27
  36. package/src/trails/release-check.ts +8 -8
  37. package/src/trails/release-smoke.ts +2 -2
  38. package/src/trails/revise.ts +2 -2
  39. package/src/trails/run-example.ts +9 -9
  40. package/src/trails/run-examples.ts +9 -9
  41. package/src/trails/run.ts +26 -26
  42. package/src/trails/survey.ts +45 -45
  43. package/src/trails/topo-activation.ts +2 -2
  44. package/src/trails/topo-history.ts +8 -8
  45. package/src/trails/topo-output-schemas.ts +5 -5
  46. package/src/trails/topo-pin.ts +6 -6
  47. package/src/trails/topo-read-support.ts +4 -3
  48. package/src/trails/topo-reports.ts +16 -16
  49. package/src/trails/topo-store-support.ts +18 -9
  50. package/src/trails/topo-support.ts +2 -2
  51. package/src/trails/topo-unpin.ts +12 -12
  52. package/src/trails/topo.ts +4 -4
  53. package/src/trails/validate.ts +2 -2
  54. package/src/trails/version-lifecycle-support.ts +17 -16
  55. package/src/trails/warden-guide.ts +8 -8
  56. package/src/trails/warden.ts +21 -21
  57. package/src/trails/wayfind-outline.ts +876 -0
  58. package/src/trails/wayfind.ts +74 -74
@@ -66,16 +66,16 @@ const fieldOverrideOutput = z.object({
66
66
  }),
67
67
  });
68
68
 
69
- const contourDetailOutput = z.object({
69
+ const entityDetailOutput = z.object({
70
70
  description: z.string().optional(),
71
71
  exampleCount: z.number(),
72
72
  id: z.string(),
73
73
  identity: z.string().optional(),
74
- kind: z.literal('contour'),
74
+ kind: z.literal('entity'),
75
75
  references: z
76
76
  .array(
77
77
  z.object({
78
- contour: z.string(),
78
+ entity: z.string(),
79
79
  field: z.string(),
80
80
  identity: z.string(),
81
81
  })
@@ -201,8 +201,6 @@ export const trailDetailOutput = z.object({
201
201
  trail: z.array(z.string()).readonly(),
202
202
  }),
203
203
  composes: z.array(z.string()).readonly(),
204
- contourDetails: z.array(contourDetailOutput).readonly(),
205
- contours: z.array(z.string()).readonly(),
206
204
  description: z.string().nullable(),
207
205
  detours: z
208
206
  .array(
@@ -213,6 +211,8 @@ export const trailDetailOutput = z.object({
213
211
  )
214
212
  .readonly()
215
213
  .nullable(),
214
+ entities: z.array(z.string()).readonly(),
215
+ entityDetails: z.array(entityDetailOutput).readonly(),
216
216
  examples: z.array(z.unknown()).readonly(),
217
217
  fieldOverrides: z.array(fieldOverrideOutput).readonly(),
218
218
  fires: z.array(z.string()).readonly(),
@@ -9,12 +9,6 @@ import {
9
9
  } from './topo-support.js';
10
10
 
11
11
  export const topoPinTrail = trail('topo.pin', {
12
- blaze: async (input, ctx) =>
13
- withFreshOperatorApp(input, ctx, ({ lease, rootDir }) =>
14
- Result.ok(
15
- pinCurrentTopoSnapshot(lease.app, { name: input.name, rootDir })
16
- )
17
- ),
18
12
  description: 'Pin the current topo under a durable name',
19
13
  examples: [
20
14
  {
@@ -25,6 +19,12 @@ export const topoPinTrail = trail('topo.pin', {
25
19
  name: 'Pin the current topo',
26
20
  },
27
21
  ],
22
+ implementation: async (input, ctx) =>
23
+ withFreshOperatorApp(input, ctx, ({ lease, rootDir }) =>
24
+ Result.ok(
25
+ pinCurrentTopoSnapshot(lease.app, { name: input.name, rootDir })
26
+ )
27
+ ),
28
28
  input: z.object({
29
29
  module: z.string().optional().describe('Path to the app module'),
30
30
  name: z.string().describe('Pin name'),
@@ -22,16 +22,17 @@ import {
22
22
  deriveTopoGraph,
23
23
  deriveTopoGraphDiff,
24
24
  deriveTopoGraphHash,
25
+ LOCK_MANIFEST_SCHEMA_VERSION,
25
26
  readLockManifest,
26
27
  readTopoGraph,
27
28
  readTrailsLock,
28
29
  stripTopoGraphForces,
29
- } from '@ontrails/topographer';
30
+ } from '@ontrails/topography';
30
31
  import type {
31
32
  LockManifest,
32
33
  TopoGraph,
33
34
  TopoGraphOverlayRegistration,
34
- } from '@ontrails/topographer';
35
+ } from '@ontrails/topography';
35
36
 
36
37
  import type {
37
38
  BriefReport,
@@ -121,7 +122,7 @@ const readCommittedLock = async (
121
122
  ],
122
123
  scope: trailsLock.scope,
123
124
  summary: trailsLock.summary,
124
- version: 3,
125
+ version: LOCK_MANIFEST_SCHEMA_VERSION,
125
126
  },
126
127
  topoGraph: trailsLock.topoGraph as TopoGraph,
127
128
  };
@@ -9,7 +9,7 @@ import type { AnyTrail, Signal, Topo } from '@ontrails/core';
9
9
  import { deriveHttpMethod } from '@ontrails/http';
10
10
  import type { HttpMethod } from '@ontrails/http';
11
11
  import { deriveToolName } from '@ontrails/mcp';
12
- import { deriveTopoGraph } from '@ontrails/topographer';
12
+ import { deriveTopoGraph } from '@ontrails/topography';
13
13
  import type {
14
14
  JsonSchema,
15
15
  TopoGraph,
@@ -18,7 +18,7 @@ import type {
18
18
  TopoGraphFieldOverride,
19
19
  TopoGraphLayerReference,
20
20
  TopoGraphVersionEntry,
21
- } from '@ontrails/topographer';
21
+ } from '@ontrails/topography';
22
22
  import { z } from 'zod';
23
23
 
24
24
  import type {
@@ -122,7 +122,7 @@ export interface ShippedSurfaceInventoryReport {
122
122
  }[];
123
123
  }
124
124
 
125
- type TopoGraphContourEntry = TopoGraphEntry & { readonly kind: 'contour' };
125
+ type TopoGraphEntityEntry = TopoGraphEntry & { readonly kind: 'entity' };
126
126
 
127
127
  export interface TrailDetailOptions {
128
128
  readonly surfaceLayerNames?: Partial<SurfaceLayerNames> | undefined;
@@ -191,8 +191,8 @@ export interface TrailDetailReport {
191
191
  readonly surface: SurfaceLayerNames;
192
192
  readonly trail: readonly string[];
193
193
  };
194
- readonly contourDetails: readonly TopoGraphContourEntry[];
195
- readonly contours: readonly string[];
194
+ readonly entityDetails: readonly TopoGraphEntityEntry[];
195
+ readonly entities: readonly string[];
196
196
  readonly description: string | null;
197
197
  readonly detours:
198
198
  | readonly { readonly on: string; readonly maxAttempts: number }[]
@@ -679,8 +679,8 @@ const deriveResolvedTrailGraphDetail = (
679
679
  | 'activationContext'
680
680
  | 'activationEdges'
681
681
  | 'cli'
682
- | 'contourDetails'
683
- | 'contours'
682
+ | 'entityDetails'
683
+ | 'entities'
684
684
  | 'fieldOverrides'
685
685
  | 'governance'
686
686
  | 'input'
@@ -695,12 +695,12 @@ const deriveResolvedTrailGraphDetail = (
695
695
  const topoGraph =
696
696
  topoGraphOverride ?? (app === undefined ? undefined : deriveTopoGraph(app));
697
697
  const topoEntry = findTopoEntry(topoGraph, trailId, 'trail');
698
- const contours = topoEntry?.contours ?? [];
699
- const contourDetails = contours
700
- .map((contourId) => findTopoEntry(topoGraph, contourId, 'contour'))
698
+ const entities = topoEntry?.entities ?? [];
699
+ const entityDetails = entities
700
+ .map((entityId) => findTopoEntry(topoGraph, entityId, 'entity'))
701
701
  .filter(
702
- (entry): entry is TopoGraphContourEntry =>
703
- entry !== undefined && entry.kind === 'contour'
702
+ (entry): entry is TopoGraphEntityEntry =>
703
+ entry !== undefined && entry.kind === 'entity'
704
704
  );
705
705
 
706
706
  return {
@@ -715,8 +715,8 @@ const deriveResolvedTrailGraphDetail = (
715
715
  fallbackActivationEdges
716
716
  ),
717
717
  cli: topoEntry?.cli ?? null,
718
- contourDetails,
719
- contours,
718
+ entities,
719
+ entityDetails,
720
720
  fieldOverrides: topoEntry?.fieldOverrides ?? [],
721
721
  governance: topoEntry?.governance ?? null,
722
722
  input: topoEntry?.input ?? null,
@@ -782,10 +782,10 @@ export const deriveTrailDetail = (
782
782
  trail: trailLayerNames,
783
783
  },
784
784
  composes: item.composes.toSorted(),
785
- contourDetails: graphDetail.contourDetails,
786
- contours: graphDetail.contours,
787
785
  description: item.description ?? null,
788
786
  detours: formatTrailDetours(item),
787
+ entities: graphDetail.entities,
788
+ entityDetails: graphDetail.entityDetails,
789
789
  examples: item.examples ?? [],
790
790
  fieldOverrides: graphDetail.fieldOverrides,
791
791
  fires: activation.fires,
@@ -22,21 +22,23 @@ import type {
22
22
  TopoGraphOverlayRegistration,
23
23
  TopoSnapshot,
24
24
  TrailsLock,
25
- } from '@ontrails/topographer';
26
- import type { StoredTopoExport } from '@ontrails/topographer/backend-support';
25
+ } from '@ontrails/topography';
26
+ import type { StoredTopoExport } from '@ontrails/topography/backend-support';
27
27
  import {
28
28
  annotateTopoGraphForces,
29
29
  carryForwardTopoGraphForces,
30
30
  deriveSourceFingerprint,
31
31
  deriveTopoGraphDiff,
32
32
  deriveTopoGraphHash,
33
+ isTopoArtifactRegenerationError,
33
34
  readTopoGraph,
35
+ TRAILS_LOCK_SCHEMA_VERSION,
34
36
  writeTrailsLock,
35
- } from '@ontrails/topographer';
37
+ } from '@ontrails/topography';
36
38
  import {
37
39
  createStoredTopoSnapshot,
38
40
  getStoredTopoExport,
39
- } from '@ontrails/topographer/backend-support';
41
+ } from '@ontrails/topography/backend-support';
40
42
 
41
43
  import { removeRootRelativeFileIfPresent } from '../local-state-io.js';
42
44
 
@@ -152,8 +154,15 @@ export const deriveCurrentTopoExport = (
152
154
  const readPreviousCommittedTopo = async (
153
155
  rootDir: string
154
156
  ): Promise<TopoGraph | null> => {
155
- const rootTopo = await readTopoGraph({ dir: rootDir });
156
- return rootTopo ?? readTopoGraph({ dir: deriveTrailsDir({ rootDir }) });
157
+ try {
158
+ const rootTopo = await readTopoGraph({ dir: rootDir });
159
+ return rootTopo ?? readTopoGraph({ dir: deriveTrailsDir({ rootDir }) });
160
+ } catch (error) {
161
+ if (isTopoArtifactRegenerationError(error)) {
162
+ return null;
163
+ }
164
+ throw error;
165
+ }
157
166
  };
158
167
 
159
168
  const prepareStoredExportArtifacts = async (
@@ -232,8 +241,8 @@ const writeStoredExportArtifacts = async (
232
241
  {
233
242
  scope: lockManifest.scope,
234
243
  summary: {
235
- contours: prepared.topoGraph.entries.filter(
236
- (entry) => entry.kind === 'contour'
244
+ entities: prepared.topoGraph.entries.filter(
245
+ (entry) => entry.kind === 'entity'
237
246
  ).length,
238
247
  resources: prepared.topoGraph.entries.filter(
239
248
  (entry) => entry.kind === 'resource'
@@ -247,7 +256,7 @@ const writeStoredExportArtifacts = async (
247
256
  },
248
257
  topoGraph: committedTopoGraph,
249
258
  topoGraphHash: prepared.hash,
250
- version: 4,
259
+ version: TRAILS_LOCK_SCHEMA_VERSION,
251
260
  } as TrailsLock,
252
261
  { dir: rootDir }
253
262
  );
@@ -8,8 +8,8 @@ import {
8
8
  listTopoSnapshots as readTopoSnapshots,
9
9
  pinTopoSnapshot,
10
10
  unpinTopoSnapshot,
11
- } from '@ontrails/topographer';
12
- import type { TopoSnapshot } from '@ontrails/topographer';
11
+ } from '@ontrails/topography';
12
+ import type { TopoSnapshot } from '@ontrails/topography';
13
13
  import { z } from 'zod';
14
14
 
15
15
  import {
@@ -9,7 +9,18 @@ import {
9
9
  import { resolveTrailRootDir } from './root-dir.js';
10
10
 
11
11
  export const topoUnpinTrail = trail('topo.unpin', {
12
- blaze: (input, ctx) => {
12
+ description: 'Remove a named topo pin',
13
+ examples: [
14
+ {
15
+ input: {
16
+ ...createIsolatedExampleInput('topo-unpin'),
17
+ dryRun: true,
18
+ name: 'before-auth-refactor',
19
+ },
20
+ name: 'Preview pin removal',
21
+ },
22
+ ],
23
+ implementation: (input, ctx) => {
13
24
  if (input.dryRun !== true && input.yes !== true) {
14
25
  return Result.err(
15
26
  new ValidationError(
@@ -31,17 +42,6 @@ export const topoUnpinTrail = trail('topo.unpin', {
31
42
  })
32
43
  );
33
44
  },
34
- description: 'Remove a named topo pin',
35
- examples: [
36
- {
37
- input: {
38
- ...createIsolatedExampleInput('topo-unpin'),
39
- dryRun: true,
40
- name: 'before-auth-refactor',
41
- },
42
- name: 'Preview pin removal',
43
- },
44
- ],
45
45
  input: z.object({
46
46
  dryRun: z
47
47
  .boolean()
@@ -72,10 +72,6 @@ const summaryOutput = z.object({
72
72
  });
73
73
 
74
74
  export const topoTrail = trail('topo', {
75
- blaze: async (input, ctx) =>
76
- withFreshOperatorApp(input, ctx, ({ lease, rootDir }) =>
77
- Result.ok(deriveTopoSummary(lease.app, { rootDir }))
78
- ),
79
75
  description: 'Show the current topo summary and entry list',
80
76
  examples: [
81
77
  {
@@ -83,6 +79,10 @@ export const topoTrail = trail('topo', {
83
79
  name: 'Show the current topo summary',
84
80
  },
85
81
  ],
82
+ implementation: async (input, ctx) =>
83
+ withFreshOperatorApp(input, ctx, ({ lease, rootDir }) =>
84
+ Result.ok(deriveTopoSummary(lease.app, { rootDir }))
85
+ ),
86
86
  input: z.object({
87
87
  module: z.string().optional().describe('Path to the app module'),
88
88
  rootDir: z.string().optional().describe('Workspace root directory'),
@@ -5,14 +5,14 @@ import { withFreshOperatorApp } from './operator-context.js';
5
5
  import { validateCurrentTopo } from './topo-read-support.js';
6
6
 
7
7
  export const validateTrail = trail('validate', {
8
- blaze: async (input, ctx) =>
8
+ description: 'Validate that root trails.lock matches the current topo',
9
+ implementation: async (input, ctx) =>
9
10
  withFreshOperatorApp(input, ctx, ({ lease, rootDir }) =>
10
11
  validateCurrentTopo(lease.app, {
11
12
  overlays: lease.overlays,
12
13
  rootDir,
13
14
  })
14
15
  ),
15
- description: 'Validate that root trails.lock matches the current topo',
16
16
  input: z.object({
17
17
  module: z.string().optional().describe('Path to the app module'),
18
18
  rootDir: z.string().optional().describe('Workspace root directory'),
@@ -3,9 +3,9 @@ import { join } from 'node:path';
3
3
 
4
4
  import { Result, ValidationError } from '@ontrails/core';
5
5
  import type { AnyTrail, Topo } from '@ontrails/core';
6
- import { deriveTopoGraph } from '@ontrails/topographer';
7
- import type { TopoGraph, TopoGraphForceEntry } from '@ontrails/topographer';
8
- import { findTrailDefinitions, parse } from '@ontrails/warden/ast';
6
+ import { deriveTopoGraph } from '@ontrails/topography';
7
+ import type { TopoGraph, TopoGraphForceEntry } from '@ontrails/topography';
8
+ import { findTrailDefinitions, parse } from '@ontrails/source';
9
9
 
10
10
  import {
11
11
  readLifecycleSourceFile,
@@ -432,7 +432,7 @@ const missingResultImportWarning = (source: string): readonly string[] =>
432
432
  hasDirectResultImport(source)
433
433
  ? []
434
434
  : [
435
- 'Fork blaze placeholder references Result.err, but this file does not import Result from @ontrails/core.',
435
+ 'Fork implementation placeholder references Result.err, but this file does not import Result from @ontrails/core.',
436
436
  ];
437
437
 
438
438
  const lineIndentAt = (source: string, index: number): string => {
@@ -460,13 +460,13 @@ const buildVersionEntry = (
460
460
  kind: LifecycleEntryKind,
461
461
  input: string,
462
462
  output: string,
463
- blaze: string | undefined
463
+ implementation: string | undefined
464
464
  ): string => {
465
465
  if (kind === 'fork') {
466
466
  return ` ${version}: {
467
467
  input: ${input},
468
468
  output: ${output},
469
- blaze: ${blaze ?? 'async () => Result.err(new Error("TODO: implement fork blaze"))'},
469
+ implementation: ${implementation ?? 'async () => Result.err(new Error("TODO: implement fork implementation"))'},
470
470
  },`;
471
471
  }
472
472
 
@@ -542,8 +542,9 @@ export const reviseTrailSource = (
542
542
 
543
543
  const currentVersion = trail.version ?? 1;
544
544
  const nextVersion = currentVersion + 1;
545
- const blaze = findConfigProperty(match.value, 'blaze');
546
- const usesForkPlaceholder = kind === 'fork' && blaze?.value === undefined;
545
+ const implementation = findConfigProperty(match.value, 'implementation');
546
+ const usesForkPlaceholder =
547
+ kind === 'fork' && implementation?.value === undefined;
547
548
  let nextSource = upsertCurrentVersion(
548
549
  match.value.source,
549
550
  match.value,
@@ -563,7 +564,7 @@ export const reviseTrailSource = (
563
564
  kind,
564
565
  input.value,
565
566
  output.value,
566
- blaze?.value
567
+ implementation?.value
567
568
  )
568
569
  );
569
570
  const written = writeLifecycleSourceFile(match.value.sourcePath, nextSource);
@@ -596,8 +597,8 @@ const forkVersionEntry = (
596
597
  configEnd: entry.valueEnd,
597
598
  configStart: propertyObjectStart(source, entry),
598
599
  };
599
- const forkBlaze =
600
- 'blaze: async () => Result.err(new Error("TODO: implement fork blaze"))';
600
+ const forkImplementation =
601
+ 'implementation: async () => Result.err(new Error("TODO: implement fork implementation"))';
601
602
  const transpose = findConfigProperty(entryMatch, 'transpose');
602
603
  if (transpose !== undefined) {
603
604
  const indent = lineIndentAt(source, transpose.start);
@@ -606,13 +607,13 @@ const forkVersionEntry = (
606
607
  source,
607
608
  transpose.start,
608
609
  transpose.end,
609
- `${indent}${forkBlaze},`
610
+ `${indent}${forkImplementation},`
610
611
  ),
611
612
  usedPlaceholder: true,
612
613
  };
613
614
  }
614
- const blaze = findConfigProperty(entryMatch, 'blaze');
615
- if (blaze !== undefined) {
615
+ const implementation = findConfigProperty(entryMatch, 'implementation');
616
+ if (implementation !== undefined) {
616
617
  return { source, usedPlaceholder: false };
617
618
  }
618
619
  return {
@@ -620,7 +621,7 @@ const forkVersionEntry = (
620
621
  source,
621
622
  propertyObjectCloseLineStart(source, entry),
622
623
  propertyObjectCloseLineStart(source, entry),
623
- ` ${forkBlaze},\n`
624
+ ` ${forkImplementation},\n`
624
625
  ),
625
626
  usedPlaceholder: true,
626
627
  };
@@ -848,7 +849,7 @@ const isDoctorForceEntry = (value: unknown): value is TopoGraphForceEntry =>
848
849
  (value['change'] === 'modified' || value['change'] === 'removed') &&
849
850
  typeof value['detail'] === 'string' &&
850
851
  typeof value['id'] === 'string' &&
851
- (value['kind'] === 'contour' ||
852
+ (value['kind'] === 'entity' ||
852
853
  value['kind'] === 'trail' ||
853
854
  value['kind'] === 'signal' ||
854
855
  value['kind'] === 'resource') &&
@@ -104,14 +104,6 @@ const wardenGuideFields = {
104
104
  >;
105
105
 
106
106
  export const wardenGuideTrail = trail('warden.guide', {
107
- blaze: (input) => {
108
- const manifest = buildWardenGuideManifest();
109
- return Result.ok({
110
- format: input.guideFormat,
111
- formatted: formatWardenGuide(manifest, input.guideFormat),
112
- manifest,
113
- });
114
- },
115
107
  description: 'Project Warden rule guidance as markdown or JSON',
116
108
  examples: [
117
109
  {
@@ -124,6 +116,14 @@ export const wardenGuideTrail = trail('warden.guide', {
124
116
  },
125
117
  ],
126
118
  fields: wardenGuideFields,
119
+ implementation: (input) => {
120
+ const manifest = buildWardenGuideManifest();
121
+ return Result.ok({
122
+ format: input.guideFormat,
123
+ formatted: formatWardenGuide(manifest, input.guideFormat),
124
+ manifest,
125
+ });
126
+ },
127
127
  input: wardenGuideInputSchema,
128
128
  intent: 'read',
129
129
  output: z.object({
@@ -171,7 +171,27 @@ export const buildWardenCommandArgs = (
171
171
  };
172
172
 
173
173
  export const wardenTrail = trail('warden', {
174
- blaze: async (input, ctx) => {
174
+ description: 'Run governance checks (lint + drift)',
175
+ examples: [
176
+ {
177
+ input: {
178
+ depth: 'source',
179
+ lock: 'skip',
180
+ rootDir: createIsolatedWardenExampleRoot('default'),
181
+ },
182
+ name: 'Default warden run',
183
+ },
184
+ {
185
+ input: {
186
+ depth: 'source',
187
+ format: 'github',
188
+ lock: 'skip',
189
+ rootDir: createIsolatedWardenExampleRoot('github'),
190
+ },
191
+ name: 'GitHub Actions annotations',
192
+ },
193
+ ],
194
+ implementation: async (input, ctx) => {
175
195
  const rootDirResult = resolveTrailRootDir(input.rootDir, ctx.cwd);
176
196
  if (rootDirResult.isErr()) {
177
197
  return rootDirResult;
@@ -194,26 +214,6 @@ export const wardenTrail = trail('warden', {
194
214
  warnCount: report.warnCount,
195
215
  });
196
216
  },
197
- description: 'Run governance checks (lint + drift)',
198
- examples: [
199
- {
200
- input: {
201
- depth: 'source',
202
- lock: 'skip',
203
- rootDir: createIsolatedWardenExampleRoot('default'),
204
- },
205
- name: 'Default warden run',
206
- },
207
- {
208
- input: {
209
- depth: 'source',
210
- format: 'github',
211
- lock: 'skip',
212
- rootDir: createIsolatedWardenExampleRoot('github'),
213
- },
214
- name: 'GitHub Actions annotations',
215
- },
216
- ],
217
217
  input: wardenInputSchema,
218
218
  intent: 'write',
219
219
  output: z.object({