@open-agent-toolkit/cli 0.3.7 → 0.3.9

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 (147) hide show
  1. package/README.md +3 -3
  2. package/assets/agents/oat-codebase-mapper.md +3 -2
  3. package/assets/agents/oat-reviewer.md +5 -13
  4. package/assets/agents/skeptical-evaluator.md +6 -2
  5. package/assets/bundle-metadata.json +1 -1
  6. package/assets/docs/cli-utilities/backlog-lifecycle.md +3 -2
  7. package/assets/docs/cli-utilities/bootstrap.md +5 -2
  8. package/assets/docs/cli-utilities/config-and-local-state.md +13 -6
  9. package/assets/docs/cli-utilities/configuration.md +25 -10
  10. package/assets/docs/cli-utilities/tool-packs.md +60 -10
  11. package/assets/docs/cli-utilities/workflow-gates.md +37 -0
  12. package/assets/docs/contributing/code.md +9 -5
  13. package/assets/docs/provider-sync/commands.md +17 -8
  14. package/assets/docs/provider-sync/instruction-sync.md +241 -39
  15. package/assets/docs/provider-sync/providers.md +20 -0
  16. package/assets/docs/provider-sync/scope-and-surface.md +3 -1
  17. package/assets/docs/reference/cli-reference.md +4 -1
  18. package/assets/docs/reference/oat-directory-structure.md +12 -11
  19. package/assets/docs/reference/troubleshooting.md +19 -4
  20. package/assets/docs/workflows/projects/evidence-layers.md +5 -1
  21. package/assets/docs/workflows/projects/implementation-execution.md +22 -8
  22. package/assets/docs/workflows/projects/lifecycle.md +4 -6
  23. package/assets/docs/workflows/projects/retro.md +7 -0
  24. package/assets/public-package-versions.json +4 -4
  25. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +4 -4
  26. package/assets/skills/oat-agent-instructions-analyze/references/analysis-artifact-template.md +5 -5
  27. package/assets/skills/oat-agent-instructions-analyze/references/docs/rules-files.md +14 -11
  28. package/assets/skills/oat-agent-instructions-analyze/references/quality-checklist.md +2 -2
  29. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-instruction-files.sh +4 -3
  30. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-providers.sh +17 -6
  31. package/assets/skills/oat-agent-instructions-apply/SKILL.md +3 -3
  32. package/assets/skills/oat-agent-instructions-apply/references/docs/rules-files.md +14 -11
  33. package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
  34. package/assets/skills/oat-dispatch-subagents/references/managed-claude-example.json +387 -0
  35. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +75 -0
  36. package/assets/skills/oat-doctor/SKILL.md +17 -13
  37. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
  38. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
  39. package/assets/skills/oat-project-implement/SKILL.md +2 -2
  40. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +33 -11
  41. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +24 -22
  42. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
  43. package/assets/skills/oat-project-implement/references/phase-execution.md +109 -8
  44. package/assets/skills/oat-project-lite/SKILL.md +23 -1
  45. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +1 -1
  46. package/assets/skills/oat-project-next/SKILL.md +3 -3
  47. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
  48. package/assets/skills/oat-project-progress/SKILL.md +2 -2
  49. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
  50. package/assets/skills/oat-project-retro/SKILL.md +70 -6
  51. package/assets/skills/oat-project-review-provide/SKILL.md +3 -1
  52. package/assets/skills/oat-project-review-provide-remote/SKILL.md +3 -1
  53. package/assets/templates/docs-app-mkdocs/docs/contributing.md +1 -3
  54. package/assets/templates/pjm-agents.md +7 -3
  55. package/assets/templates/state.md +2 -2
  56. package/dist/agents/canonical/resolve.d.ts +6 -4
  57. package/dist/agents/canonical/resolve.d.ts.map +1 -1
  58. package/dist/agents/canonical/resolve.js +6 -4
  59. package/dist/commands/backlog/archive.d.ts +10 -2
  60. package/dist/commands/backlog/archive.d.ts.map +1 -1
  61. package/dist/commands/backlog/archive.js +22 -6
  62. package/dist/commands/backlog/index.d.ts.map +1 -1
  63. package/dist/commands/backlog/index.js +5 -1
  64. package/dist/commands/backlog/rewrite-references.d.ts +41 -0
  65. package/dist/commands/backlog/rewrite-references.d.ts.map +1 -0
  66. package/dist/commands/backlog/rewrite-references.js +516 -0
  67. package/dist/commands/config/index.d.ts +1 -0
  68. package/dist/commands/config/index.d.ts.map +1 -1
  69. package/dist/commands/config/index.js +69 -34
  70. package/dist/commands/gate/index.d.ts.map +1 -1
  71. package/dist/commands/gate/index.js +51 -2
  72. package/dist/commands/gate/review-verdict.d.ts +22 -0
  73. package/dist/commands/gate/review-verdict.d.ts.map +1 -1
  74. package/dist/commands/gate/review-verdict.js +111 -0
  75. package/dist/commands/init/index.d.ts +6 -0
  76. package/dist/commands/init/index.d.ts.map +1 -1
  77. package/dist/commands/init/index.js +27 -4
  78. package/dist/commands/init/tools/index.d.ts +18 -1
  79. package/dist/commands/init/tools/index.d.ts.map +1 -1
  80. package/dist/commands/init/tools/index.js +84 -17
  81. package/dist/commands/init/tools/project-guidance.d.ts +19 -4
  82. package/dist/commands/init/tools/project-guidance.d.ts.map +1 -1
  83. package/dist/commands/init/tools/project-guidance.js +58 -15
  84. package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
  85. package/dist/commands/init/tools/workflows/index.js +5 -1
  86. package/dist/commands/instructions/instructions.types.d.ts +105 -4
  87. package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
  88. package/dist/commands/instructions/instructions.types.js +4 -5
  89. package/dist/commands/instructions/instructions.utils.d.ts +161 -6
  90. package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
  91. package/dist/commands/instructions/instructions.utils.js +650 -12
  92. package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
  93. package/dist/commands/instructions/sync/sync.js +256 -18
  94. package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
  95. package/dist/commands/instructions/validate/validate.js +36 -8
  96. package/dist/commands/pjm/index.d.ts.map +1 -1
  97. package/dist/commands/pjm/index.js +19 -4
  98. package/dist/commands/pjm/init.d.ts +3 -0
  99. package/dist/commands/pjm/init.d.ts.map +1 -1
  100. package/dist/commands/pjm/init.js +23 -5
  101. package/dist/commands/project/dispatch/canonical-role.d.ts +33 -0
  102. package/dist/commands/project/dispatch/canonical-role.d.ts.map +1 -0
  103. package/dist/commands/project/dispatch/canonical-role.js +114 -0
  104. package/dist/commands/project/dispatch/index.d.ts.map +1 -1
  105. package/dist/commands/project/dispatch/index.js +3 -1
  106. package/dist/commands/project/dispatch/record.d.ts.map +1 -1
  107. package/dist/commands/project/dispatch/record.js +146 -4
  108. package/dist/commands/shared/agents-md.d.ts +26 -5
  109. package/dist/commands/shared/agents-md.d.ts.map +1 -1
  110. package/dist/commands/shared/agents-md.js +182 -3
  111. package/dist/commands/sync/apply.d.ts.map +1 -1
  112. package/dist/commands/sync/apply.js +28 -21
  113. package/dist/commands/tools/guidance/index.d.ts +15 -0
  114. package/dist/commands/tools/guidance/index.d.ts.map +1 -0
  115. package/dist/commands/tools/guidance/index.js +81 -0
  116. package/dist/commands/tools/index.d.ts.map +1 -1
  117. package/dist/commands/tools/index.js +2 -0
  118. package/dist/commands/tools/shared/sync-evidence.d.ts.map +1 -1
  119. package/dist/commands/tools/shared/sync-evidence.js +32 -5
  120. package/dist/config/oat-config.d.ts +57 -3
  121. package/dist/config/oat-config.d.ts.map +1 -1
  122. package/dist/config/oat-config.js +223 -15
  123. package/dist/config/resolve.d.ts.map +1 -1
  124. package/dist/config/resolve.js +12 -2
  125. package/dist/engine/compute-plan.d.ts.map +1 -1
  126. package/dist/engine/compute-plan.js +31 -3
  127. package/dist/providers/claude/dispatch-envelope.d.ts +53 -0
  128. package/dist/providers/claude/dispatch-envelope.d.ts.map +1 -1
  129. package/dist/providers/claude/dispatch-envelope.js +324 -48
  130. package/dist/providers/claude/rule-transform.js +1 -1
  131. package/dist/providers/copilot/rule-transform.js +1 -1
  132. package/dist/providers/cursor/rule-transform.js +1 -1
  133. package/dist/providers/identity/absolute-paths.d.ts +13 -0
  134. package/dist/providers/identity/absolute-paths.d.ts.map +1 -1
  135. package/dist/providers/identity/absolute-paths.js +27 -14
  136. package/dist/providers/identity/generic-dispatch-record.d.ts +212 -0
  137. package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -1
  138. package/dist/providers/identity/generic-dispatch-record.js +78 -19
  139. package/dist/providers/identity/oat-dispatch-record.d.ts +5 -0
  140. package/dist/providers/identity/oat-dispatch-record.d.ts.map +1 -1
  141. package/dist/providers/identity/oat-dispatch-record.js +11 -2
  142. package/dist/providers/shared/registry.d.ts +6 -0
  143. package/dist/providers/shared/registry.d.ts.map +1 -1
  144. package/dist/providers/shared/registry.js +30 -0
  145. package/dist/rules/canonical/parse.d.ts.map +1 -1
  146. package/dist/rules/canonical/parse.js +38 -3
  147. package/package.json +2 -2
@@ -13,7 +13,7 @@ import { type InstallBrainstormOptions, type InstallBrainstormResult } from './b
13
13
  import { type InstallCoreOptions, type InstallCoreResult } from './core/install-core.js';
14
14
  import { type InstallDocsOptions, type InstallDocsResult } from './docs/install-docs.js';
15
15
  import { type InstallIdeasOptions, type InstallIdeasResult } from './ideas/install-ideas.js';
16
- import { type PlanProjectGuidanceInput, planProjectGuidance } from './project-guidance.js';
16
+ import { type AgentsGuidancePlan, type PlanProjectGuidanceInput, planProjectGuidance, type ProjectGuidancePack } from './project-guidance.js';
17
17
  import { type InstallProjectManagementOptions, type InstallProjectManagementResult } from './project-management/install-project-management.js';
18
18
  import { type InstallResearchOptions, type InstallResearchResult } from './research/install-research.js';
19
19
  import { type InstallUtilityOptions, type InstallUtilityResult } from './utility/install-utility.js';
@@ -78,6 +78,23 @@ interface PackScopeChange {
78
78
  export declare function formatReconcileSummary(adds: PackScopeChange[], removes: PackScopeChange[]): string;
79
79
  export declare function consumeInitToolsRunMetadata(): InitToolsRunMetadata | null;
80
80
  export declare function wasInstallSyncHandled(command: Command): boolean;
81
+ export interface RealizedGuidanceState {
82
+ packs: ProjectGuidancePack[];
83
+ /** Project skills that belong to no OAT pack, by name. */
84
+ otherProjectSkills: string[];
85
+ }
86
+ /**
87
+ * Reads the realized pack placement (and unrelated project skills) the OAT
88
+ * tools block describes. Read-only: it inventories and scans installed state
89
+ * and never installs, upgrades, or writes.
90
+ */
91
+ export declare function loadRealizedGuidanceState(context: CommandContext, projectRoot: string | null, overrides?: Partial<InitToolsDependencies>): Promise<RealizedGuidanceState>;
92
+ /**
93
+ * Plans and applies the OAT tools guidance block for the packs already
94
+ * installed, without installing or upgrading anything. `oat init` uses it to
95
+ * honor `--project-guidance` when guided setup does not run.
96
+ */
97
+ export declare function applyProjectGuidanceForInstalledPacks(context: CommandContext, projectRoot: string | null, explicitChoice: boolean, overrides?: Partial<InitToolsDependencies>): Promise<AgentsGuidancePlan>;
81
98
  export { buildToolPacksSectionBody } from './project-guidance.js';
82
99
  export declare function runInitTools(context: CommandContext, dependencies: InitToolsDependencies, explicitProjectGuidance?: boolean): Promise<ToolPack[]>;
83
100
  export declare function runInitToolsWithDefaults(context: CommandContext, explicitProjectGuidance?: boolean): Promise<ToolPack[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAEnB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EAIzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EAGlB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAWvE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,KAAK,oB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BAAkB,CAAC,CAa7B;AA2DD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,qBAAqB,EACnC,uBAAuB,CAAC,EAAE,OAAO,GAChC,OAAO,CAAC,QAAQ,EAAE,CAAC,CA6oBrB;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,cAAc,EACvB,uBAAuB,CAAC,EAAE,OAAO,GAChC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAMrB;AA8VD,wBAAgB,sBAAsB,CACpC,SAAS,GAAE,OAAO,CAAC,qBAAqB,CAAM,GAC7C,OAAO,CAsHT"}
@@ -532,7 +532,11 @@ async function applyProjectGuidance(plan, dependencies) {
532
532
  }
533
533
  return {
534
534
  ...plan,
535
- action: sectionResult.action === 'created' ? 'create' : 'no-change',
535
+ action: sectionResult.action === 'created'
536
+ ? 'create'
537
+ : sectionResult.action === 'appended'
538
+ ? 'appended'
539
+ : 'no-change',
536
540
  reason: `Accepted project guidance ${sectionResult.action}. Capability placement and PJM adoption were unchanged.`,
537
541
  };
538
542
  }
@@ -544,6 +548,50 @@ async function applyProjectGuidance(plan, dependencies) {
544
548
  };
545
549
  }
546
550
  }
551
+ async function realizedGuidanceState(context, repoRoot, assetsRoot, dependencies) {
552
+ const userRoot = dependencies.resolveScopeRoot('user', context.cwd, context.home);
553
+ const finalPackStates = await loadInstalledPackStates(repoRoot, userRoot, assetsRoot, dependencies);
554
+ const packs = ALL_TOOL_PACKS.flatMap((pack) => {
555
+ const scope = finalPackStates[pack].location;
556
+ return scope === 'not-installed'
557
+ ? []
558
+ : [{ pack, scope }];
559
+ });
560
+ return {
561
+ packs,
562
+ otherProjectSkills: await otherProjectSkillNames(repoRoot, assetsRoot, dependencies),
563
+ };
564
+ }
565
+ /**
566
+ * Project skills whose names belong to no bundled pack. Pack membership, not
567
+ * directory existence, decides what is "other".
568
+ */
569
+ async function otherProjectSkillNames(repoRoot, assetsRoot, dependencies) {
570
+ if (!repoRoot)
571
+ return [];
572
+ const projectTools = await dependencies.scanTools({
573
+ scope: 'project',
574
+ scopeRoot: repoRoot,
575
+ assetsRoot,
576
+ });
577
+ return projectTools
578
+ .filter(({ type, pack }) => type === 'skill' && pack === 'custom')
579
+ .map(({ name }) => name)
580
+ .sort();
581
+ }
582
+ /**
583
+ * Reads the realized pack placement (and unrelated project skills) the OAT
584
+ * tools block describes. Read-only: it inventories and scans installed state
585
+ * and never installs, upgrades, or writes.
586
+ */
587
+ export async function loadRealizedGuidanceState(context, projectRoot, overrides = {}) {
588
+ const dependencies = {
589
+ ...DEFAULT_DEPENDENCIES,
590
+ ...overrides,
591
+ };
592
+ const assetsRoot = await dependencies.resolveAssetsRoot();
593
+ return realizedGuidanceState(context, projectRoot, assetsRoot, dependencies);
594
+ }
547
595
  async function planAndApplyProjectGuidanceAfterInstall(context, assetsRoot, installedProjectRoot, explicitChoice, dependencies) {
548
596
  const initialPlan = await dependencies.planProjectGuidance({
549
597
  repoRoot: installedProjectRoot,
@@ -557,17 +605,22 @@ async function planAndApplyProjectGuidanceAfterInstall(context, assetsRoot, inst
557
605
  try {
558
606
  const repoRoot = installedProjectRoot ??
559
607
  (await dependencies.resolveProjectRoot(context.cwd));
560
- const userRoot = dependencies.resolveScopeRoot('user', context.cwd, context.home);
561
- const finalPackStates = await loadInstalledPackStates(repoRoot, userRoot, assetsRoot, dependencies);
562
- const realizedPacks = ALL_TOOL_PACKS.flatMap((pack) => {
563
- const scope = finalPackStates[pack].location;
564
- return scope === 'not-installed'
565
- ? []
566
- : [{ pack, scope }];
567
- });
608
+ const realized = await realizedGuidanceState(context, repoRoot, assetsRoot, dependencies);
609
+ if (realized.packs.length === 0) {
610
+ // An empty block would be a stale placeholder that turns the first real
611
+ // pack install into a manual patch, so write nothing.
612
+ return {
613
+ ...initialPlan,
614
+ repoRoot,
615
+ target: join(repoRoot, 'AGENTS.md'),
616
+ action: 'skipped',
617
+ reason: 'No OAT tool pack is installed, so there is no OAT tools guidance to write; AGENTS.md was left unchanged. Run `oat tools install <pack> --project-guidance` or `oat init --setup --project-guidance` to install packs with guidance.',
618
+ };
619
+ }
568
620
  const completePlan = await dependencies.planProjectGuidance({
569
621
  repoRoot,
570
- packs: realizedPacks,
622
+ packs: realized.packs,
623
+ otherProjectSkills: realized.otherProjectSkills,
571
624
  explicitChoice: true,
572
625
  interactive: false,
573
626
  confirmAction: dependencies.confirmAction,
@@ -582,6 +635,19 @@ async function planAndApplyProjectGuidanceAfterInstall(context, assetsRoot, inst
582
635
  };
583
636
  }
584
637
  }
638
+ /**
639
+ * Plans and applies the OAT tools guidance block for the packs already
640
+ * installed, without installing or upgrading anything. `oat init` uses it to
641
+ * honor `--project-guidance` when guided setup does not run.
642
+ */
643
+ export async function applyProjectGuidanceForInstalledPacks(context, projectRoot, explicitChoice, overrides = {}) {
644
+ const dependencies = {
645
+ ...DEFAULT_DEPENDENCIES,
646
+ ...overrides,
647
+ };
648
+ const assetsRoot = await dependencies.resolveAssetsRoot();
649
+ return planAndApplyProjectGuidanceAfterInstall(context, assetsRoot, projectRoot, explicitChoice, dependencies);
650
+ }
585
651
  function initProviderVisibility(syncScopes) {
586
652
  if (syncScopes.length === 0)
587
653
  return null;
@@ -1022,6 +1088,7 @@ export async function runInitTools(context, dependencies, explicitProjectGuidanc
1022
1088
  const plannedGuidance = await dependencies.planProjectGuidance({
1023
1089
  repoRoot: projectRoot,
1024
1090
  packs: realizedPacks,
1091
+ otherProjectSkills: await otherProjectSkillNames(projectRoot, assetsRoot, dependencies),
1025
1092
  explicitChoice: explicitProjectGuidance,
1026
1093
  interactive: context.interactive,
1027
1094
  confirmAction: dependencies.confirmAction,
@@ -1171,9 +1238,9 @@ function createReconciledPackCommand(pack, dependencies) {
1171
1238
  };
1172
1239
  const base = new Command(pack).description(descriptions[pack]);
1173
1240
  const scopedCommand = pack === 'core' ? base : withScopeOption(base);
1174
- const packCommand = pack === 'workflows'
1175
- ? withProjectGuidanceOptions(scopedCommand)
1176
- : scopedCommand;
1241
+ // Every pack command acts on --project-guidance: the OAT tools block
1242
+ // describes every installed pack, so any pack install can plan it.
1243
+ const packCommand = withProjectGuidanceOptions(scopedCommand);
1177
1244
  return packCommand
1178
1245
  .allowUnknownOption(false)
1179
1246
  .action(async (_options, command) => {
@@ -1182,9 +1249,7 @@ function createReconciledPackCommand(pack, dependencies) {
1182
1249
  let selection = null;
1183
1250
  let providerContexts = [];
1184
1251
  try {
1185
- const explicitProjectGuidance = pack === 'workflows'
1186
- ? commandProjectGuidanceChoice(command)
1187
- : undefined;
1252
+ const explicitProjectGuidance = commandProjectGuidanceChoice(command);
1188
1253
  const assetsRoot = await dependencies.resolveAssetsRoot();
1189
1254
  const explicitScope = command.getOptionValueSourceWithGlobals('scope') === 'cli';
1190
1255
  const requestedScope = context.scope === 'project' || context.scope === 'user'
@@ -1270,7 +1335,9 @@ function createReconciledPackCommand(pack, dependencies) {
1270
1335
  const providerVisibility = initProviderVisibility(results
1271
1336
  .filter(({ plan }) => plan.operations.length > 0)
1272
1337
  .map(({ request }) => request.scope));
1273
- const projectGuidance = pack === 'workflows'
1338
+ // `workflows` offers guidance on every run (prompting when
1339
+ // interactive); other packs plan it only when the flag is given.
1340
+ const projectGuidance = pack === 'workflows' || explicitProjectGuidance !== undefined
1274
1341
  ? await planAndApplyProjectGuidanceAfterInstall(context, assetsRoot, requests.find(({ scope }) => scope === 'project')?.scopeRoot ??
1275
1342
  null, explicitProjectGuidance, dependencies)
1276
1343
  : null;
@@ -1,4 +1,4 @@
1
- import type { AgentsMdManualPatch } from '../../shared/agents-md.js';
1
+ import { type AgentsMdManualPatch } from '../../shared/agents-md.js';
2
2
  import type { PromptContext } from '../../shared/shared.prompts.js';
3
3
  import type { PackName } from '../../tools/shared/types.js';
4
4
  import type { Command } from 'commander';
@@ -12,7 +12,7 @@ export type ProjectGuidanceChoice = {
12
12
  choice: 'not-requested';
13
13
  source: 'non-interactive-default';
14
14
  };
15
- export type AgentsGuidanceAction = 'declined' | 'not-requested' | 'create' | 'no-change' | 'manual-required' | 'blocked';
15
+ export type AgentsGuidanceAction = 'declined' | 'not-requested' | 'create' | 'appended' | 'skipped' | 'no-change' | 'manual-required' | 'blocked';
16
16
  export interface ProjectGuidancePack {
17
17
  pack: PackName;
18
18
  scope: 'project' | 'user' | 'both';
@@ -28,7 +28,14 @@ export interface AgentsGuidancePlan {
28
28
  choice: ProjectGuidanceChoice;
29
29
  manualPatch?: AgentsMdManualPatch;
30
30
  }
31
- export interface PlanProjectGuidanceInput {
31
+ export interface ToolPacksSectionOptions {
32
+ /**
33
+ * Project skills that belong to no OAT pack. They are described separately
34
+ * and never named as pack skills.
35
+ */
36
+ otherProjectSkills?: readonly string[];
37
+ }
38
+ export interface PlanProjectGuidanceInput extends ToolPacksSectionOptions {
32
39
  repoRoot: string | null;
33
40
  packs: readonly ProjectGuidancePack[];
34
41
  explicitChoice?: boolean;
@@ -41,7 +48,15 @@ export declare function reportableProjectGuidance(plan: AgentsGuidancePlan): {
41
48
  reason: string;
42
49
  manualPatch?: AgentsMdManualPatch | undefined;
43
50
  };
44
- export declare function buildToolPacksSectionBody(packs: readonly ProjectGuidancePack[]): string;
51
+ export declare function isProjectGuidanceIncomplete(plan: AgentsGuidancePlan): boolean;
52
+ /** Prints one guidance plan in the human form every guidance surface uses. */
53
+ export declare function reportProjectGuidancePlan(logger: {
54
+ info: (message: string) => void;
55
+ warn: (message: string) => void;
56
+ }, plan: AgentsGuidancePlan): void;
57
+ export declare function buildToolPacksSectionBody(packs: readonly ProjectGuidancePack[], options?: ToolPacksSectionOptions): string;
58
+ /** The complete managed `OAT tools` block, markers included. */
59
+ export declare function renderToolPacksManagedBlock(packs: readonly ProjectGuidancePack[], options?: ToolPacksSectionOptions): string;
45
60
  export declare function parseProjectGuidanceFlags(args: readonly string[]): boolean | undefined;
46
61
  export declare function commandProjectGuidanceChoice(command: Command): boolean | undefined;
47
62
  export declare function withProjectGuidanceOptions<TCommand extends Command>(command: TCommand): TCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"project-guidance.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/tools/project-guidance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAC7B;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAA;CAAE,GACjD;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAA;CAAE,GACjD;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,yBAAyB,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAC5B,UAAU,GACV,eAAe,GACf,QAAQ,GACR,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC;AAEd,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED,MAA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EAAE,kBAAkB,GAAG,OAAO,CAE7E;AAED,8EAA8E;AAC9E,wBAAgB,yBAAyB,CACvC,MAAM,EAAE;IAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,EAC5E,IAAI,EAAE,kBAAkB,GACvB,IAAI,CAmBN;AAgBD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAoER;AAED,gEAAgE;AAChE,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAKR;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,GAAG,SAAS,CAYrB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,GACf,OAAO,GAAG,SAAS,CAKrB;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,SAAS,OAAO,EACjE,OAAO,EAAE,QAAQ,GAChB,QAAQ,CAcV;AAED,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,kBAAkB,CAAC,CAyE7B"}
@@ -1,4 +1,5 @@
1
1
  import { join } from 'node:path';
2
+ import { buildAgentsMdManagedBlock, formatAgentsMdGuidanceResult, } from '../../shared/agents-md.js';
2
3
  import { CliError } from '../../../errors/index.js';
3
4
  export function reportableProjectGuidance(plan) {
4
5
  return {
@@ -8,6 +9,30 @@ export function reportableProjectGuidance(plan) {
8
9
  ...(plan.manualPatch ? { manualPatch: plan.manualPatch } : {}),
9
10
  };
10
11
  }
12
+ export function isProjectGuidanceIncomplete(plan) {
13
+ return plan.action === 'blocked' || plan.action === 'manual-required';
14
+ }
15
+ /** Prints one guidance plan in the human form every guidance surface uses. */
16
+ export function reportProjectGuidancePlan(logger, plan) {
17
+ const message = `Project guidance: ${plan.action} — ${plan.reason}`;
18
+ if (plan.action === 'skipped') {
19
+ logger.warn(message);
20
+ return;
21
+ }
22
+ if (!isProjectGuidanceIncomplete(plan)) {
23
+ logger.info(message);
24
+ return;
25
+ }
26
+ logger.warn(message);
27
+ if (plan.manualPatch) {
28
+ for (const line of formatAgentsMdGuidanceResult({
29
+ action: 'manual-required',
30
+ manualPatch: plan.manualPatch,
31
+ })) {
32
+ logger.info(line);
33
+ }
34
+ }
35
+ }
11
36
  const PACK_DESCRIPTIONS = {
12
37
  core: 'Diagnostics and documentation (oat-doctor, oat-docs)',
13
38
  docs: 'Documentation and instruction governance workflows',
@@ -18,20 +43,34 @@ const PACK_DESCRIPTIONS = {
18
43
  research: 'Research, analysis, verification, and synthesis',
19
44
  brainstorm: 'Always-on brainstorming entry point with visual companion',
20
45
  };
21
- export function buildToolPacksSectionBody(packs) {
46
+ export function buildToolPacksSectionBody(packs, options = {}) {
47
+ // Directories are named by pack membership, never by directory existence:
48
+ // `oat init --scope project` creates an empty `.agents/skills/`, and
49
+ // unrelated repository skills may live there.
50
+ const projectPacks = packs.filter((pack) => pack.scope === 'project' || pack.scope === 'both');
22
51
  const userPacks = packs.filter((pack) => pack.scope === 'user' || pack.scope === 'both');
52
+ const hasOtherProjectSkills = (options.otherProjectSkills?.length ?? 0) > 0;
23
53
  const hasWorkflows = packs.some((pack) => pack.pack === 'workflows');
24
- const lines = [
25
- '## Tool Packs',
26
- '',
27
- '- **Skills directory:** `.agents/skills/`',
28
- '- **Discover available skills:** scan `.agents/skills/*/SKILL.md`',
29
- '- **Refresh provider views:** `oat sync --scope all`',
30
- '- **Update skills to latest versions:** `oat tools update`',
31
- ];
54
+ const lines = ['## Tool Packs', ''];
55
+ if (projectPacks.length > 0) {
56
+ lines.push(`- **Project skills directory:** \`.agents/skills/\` (${projectPacks.map(({ pack }) => pack).join(', ')} packs installed at project scope)`);
57
+ }
32
58
  if (userPacks.length > 0) {
33
- lines.push(`- **User-scoped skills:** \`~/.agents/skills/\` (${userPacks.map(({ pack }) => pack).join(', ')} packs installed at user scope)`);
59
+ lines.push(`- **User skills directory:** \`~/.agents/skills/\` (${userPacks.map(({ pack }) => pack).join(', ')} packs installed at user scope)`);
60
+ }
61
+ if (hasOtherProjectSkills) {
62
+ lines.push('- **Other project skills:** `.agents/skills/` also holds repository skills that belong to no OAT pack; they are not OAT pack skills.');
34
63
  }
64
+ const scanTargets = [
65
+ ...(projectPacks.length > 0 || hasOtherProjectSkills
66
+ ? ['`.agents/skills/*/SKILL.md`']
67
+ : []),
68
+ ...(userPacks.length > 0 ? ['`~/.agents/skills/*/SKILL.md`'] : []),
69
+ ];
70
+ if (scanTargets.length > 0) {
71
+ lines.push(`- **Discover available skills:** scan ${scanTargets.join(' and ')}`);
72
+ }
73
+ lines.push('- **Refresh provider views:** `oat sync --scope all`', '- **Update skills to latest versions:** `oat tools update`');
35
74
  lines.push('', '### Installed Packs', '');
36
75
  for (const { pack, scope } of packs) {
37
76
  const suffix = scope === 'user'
@@ -46,6 +85,10 @@ export function buildToolPacksSectionBody(packs) {
46
85
  }
47
86
  return lines.join('\n');
48
87
  }
88
+ /** The complete managed `OAT tools` block, markers included. */
89
+ export function renderToolPacksManagedBlock(packs, options = {}) {
90
+ return buildAgentsMdManagedBlock('tools', buildToolPacksSectionBody(packs, options));
91
+ }
49
92
  export function parseProjectGuidanceFlags(args) {
50
93
  const accepted = args.includes('--project-guidance');
51
94
  const declined = args.includes('--no-project-guidance');
@@ -67,7 +110,7 @@ export function commandProjectGuidanceChoice(command) {
67
110
  }
68
111
  export function withProjectGuidanceOptions(command) {
69
112
  if (!command.options.some(({ long }) => long === '--project-guidance')) {
70
- command.option('--project-guidance', 'Create missing or print manual repository AGENTS.md tool guidance');
113
+ command.option('--project-guidance', 'Create or append repository AGENTS.md tool guidance, or print a manual patch');
71
114
  }
72
115
  if (!command.options.some(({ long }) => long === '--no-project-guidance')) {
73
116
  command.option('--no-project-guidance', 'Decline repository AGENTS.md tool guidance');
@@ -89,12 +132,12 @@ export async function planProjectGuidance(input) {
89
132
  };
90
133
  }
91
134
  else {
92
- const accepted = await input.confirmAction('Create missing or propose manual repository AGENTS.md tool guidance?', { interactive: input.interactive });
135
+ const accepted = await input.confirmAction('Create or append repository AGENTS.md tool guidance (a different existing block prints a manual patch)?', { interactive: input.interactive });
93
136
  choice = accepted
94
137
  ? { choice: 'accepted', source: 'prompt' }
95
138
  : { choice: 'declined', source: 'prompt' };
96
139
  }
97
- const body = buildToolPacksSectionBody(input.packs);
140
+ const body = buildToolPacksSectionBody(input.packs, input);
98
141
  if (choice.choice === 'declined') {
99
142
  return {
100
143
  repoRoot: input.repoRoot,
@@ -115,7 +158,7 @@ export async function planProjectGuidance(input) {
115
158
  sectionKey: 'tools',
116
159
  body,
117
160
  legacySectionAction: 'preserve',
118
- reason: 'Project guidance was not requested. Re-run with --project-guidance to create an absent AGENTS.md or print a manual patch for an existing one.',
161
+ reason: 'Project guidance was not requested. Re-run with --project-guidance to create an absent AGENTS.md, append an absent guidance block to an existing one, or print a manual patch for a different existing block.',
119
162
  choice,
120
163
  };
121
164
  }
@@ -138,7 +181,7 @@ export async function planProjectGuidance(input) {
138
181
  sectionKey: 'tools',
139
182
  body,
140
183
  legacySectionAction: 'remove',
141
- reason: 'Project guidance was accepted. An absent AGENTS.md may be created; an existing file requires a manual patch.',
184
+ reason: 'Project guidance was accepted. An absent AGENTS.md may be created and an absent guidance block appended; a different existing block requires a manual patch.',
142
185
  choice,
143
186
  };
144
187
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/workflows/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EAIzB,MAAM,4BAA4B,CAAC;AAEp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AAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9D,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;IAChD,qBAAqB,EAAE,CACrB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,uBAAuB,KAC9B,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACnC;AAoTD,wBAAgB,+BAA+B,CAC7C,SAAS,GAAE,OAAO,CAAC,8BAA8B,CAAM,GACtD,OAAO,CAuBT"}
@@ -70,7 +70,11 @@ async function applyProjectGuidance(plan, dependencies) {
70
70
  }
71
71
  return {
72
72
  ...plan,
73
- action: result.action === 'created' ? 'create' : 'no-change',
73
+ action: result.action === 'created'
74
+ ? 'create'
75
+ : result.action === 'appended'
76
+ ? 'appended'
77
+ : 'no-change',
74
78
  reason: `Accepted project guidance ${result.action}. Capability placement and PJM adoption were unchanged.`,
75
79
  };
76
80
  }
@@ -1,16 +1,40 @@
1
1
  import type { Dirent, Stats } from 'node:fs';
2
2
  import type { CommandContext, GlobalOptions } from '../../app/command-context.js';
3
- export declare const INSTRUCTION_SYNC_STRATEGIES: readonly ['pointer', 'symlink', 'copy'];
4
- export type InstructionSyncStrategy = (typeof INSTRUCTION_SYNC_STRATEGIES)[number];
5
- export type InstructionStatus = 'ok' | 'missing' | 'content_mismatch' | 'stray';
3
+ import type { InstructionSyncStrategy } from '../../config/oat-config.js';
4
+ export { INSTRUCTION_SYNC_STRATEGIES, type InstructionSyncStrategy, } from '../../config/oat-config.js';
5
+ /**
6
+ * - `managed_shim`: under strategy `none`, a CLAUDE.md in the exact shape OAT
7
+ * writes (the `@AGENTS.md` pointer, a symlink to the sibling AGENTS.md, or a
8
+ * byte-identical copy). Drift: sync removes it.
9
+ * - `unmanaged`: under strategy `none`, a CLAUDE.md that is not an exact
10
+ * managed shape (hand-written, modified, a symlink elsewhere). Never
11
+ * removed, and not drift.
12
+ */
13
+ export type InstructionStatus = 'ok' | 'missing' | 'content_mismatch' | 'stray' | 'managed_shim' | 'unmanaged';
14
+ export type ManagedShimShape = 'pointer' | 'symlink' | 'copy';
15
+ /**
16
+ * What the scan observed about a managed shim, so removal can fail closed if
17
+ * the file changed between planning and deletion. Internal to the sync apply
18
+ * path; never serialized into the JSON payload.
19
+ */
20
+ export interface ManagedShimRecord {
21
+ shape: ManagedShimShape;
22
+ /** `lstat` identity of the CLAUDE.md itself (the link for a symlink). */
23
+ dev: number;
24
+ ino: number;
25
+ /** The raw `readlink` value, for the symlink shape only. */
26
+ linkTarget?: string;
27
+ }
6
28
  export type InstructionsStatus = 'ok' | 'drift';
7
29
  export interface InstructionEntry {
8
30
  agentsPath: string | null;
9
31
  claudePath: string;
10
32
  status: InstructionStatus;
11
33
  detail: string;
34
+ /** Present only for `managed_shim` entries. */
35
+ managedShim?: ManagedShimRecord;
12
36
  }
13
- export type InstructionActionType = 'create' | 'update' | 'skip';
37
+ export type InstructionActionType = 'create' | 'update' | 'remove' | 'skip';
14
38
  export type InstructionActionResult = 'planned' | 'applied' | 'skipped';
15
39
  export interface InstructionActionRecord {
16
40
  type: InstructionActionType;
@@ -19,19 +43,69 @@ export interface InstructionActionRecord {
19
43
  result: InstructionActionResult;
20
44
  }
21
45
  export type InstructionsMode = 'validate' | 'dry-run' | 'apply';
46
+ /**
47
+ * A finding that never changes the exit code by itself.
48
+ *
49
+ * `claude_md_hides_agents_md`: under strategy `none`, a `CLAUDE.md`,
50
+ * `.claude/CLAUDE.md`, or `CLAUDE.local.md` that makes Claude Code's default
51
+ * `agents-md` mode ignore every AGENTS.md in the project while it exists.
52
+ */
53
+ export interface ClaudeMdHidesAgentsMdWarning {
54
+ code: 'claude_md_hides_agents_md';
55
+ /** Repository-relative POSIX path. */
56
+ path: string;
57
+ /**
58
+ * Repository-relative `AGENTS.md` paths whose symlink chain reaches `path`.
59
+ * When non-empty, removing `path` would break them: replace each link with
60
+ * the file's content first. Always present, possibly empty.
61
+ */
62
+ linkedBy: string[];
63
+ message: string;
64
+ }
65
+ /**
66
+ * `claude_md_blocks_shim_removal`: under strategy `none`, removal is all or
67
+ * nothing. While any `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md`
68
+ * is not an exact OAT shim, sync removes no CLAUDE.md at all; this finding
69
+ * names those files and the removals held back. Sync reports each held-back
70
+ * removal as a skipped action, which is what sets its exit code.
71
+ */
72
+ export interface ClaudeMdBlocksShimRemovalWarning {
73
+ code: 'claude_md_blocks_shim_removal';
74
+ /** Repository-relative POSIX paths of the files with their own content. */
75
+ paths: string[];
76
+ /** Repository-relative POSIX paths of the CLAUDE.md files kept because of them. */
77
+ wouldRemove: string[];
78
+ /**
79
+ * For each path in `paths`, the repository-relative `AGENTS.md` paths whose
80
+ * symlink chain reaches it. A non-empty list means that file holds the only
81
+ * copy of those instructions: replace each link with its content before
82
+ * removing it, never remove it plainly. Every path in `paths` has a key.
83
+ */
84
+ linkedBy: Record<string, string[]>;
85
+ message: string;
86
+ }
87
+ export type InstructionsWarning = ClaudeMdHidesAgentsMdWarning | ClaudeMdBlocksShimRemovalWarning;
22
88
  export interface InstructionsSummary {
23
89
  scanned: number;
24
90
  ok: number;
25
91
  missing: number;
26
92
  contentMismatch: number;
27
93
  stray: number;
94
+ managedShim: number;
95
+ unmanaged: number;
28
96
  created: number;
29
97
  updated: number;
98
+ removed: number;
30
99
  skipped: number;
31
100
  }
32
101
  export interface InstructionsJsonPayload {
33
102
  mode: InstructionsMode;
34
103
  status: InstructionsStatus;
104
+ /**
105
+ * The strategy this run applied or checked: `--strategy` when given, else
106
+ * `instructions.claude.shims`, else the built-in default.
107
+ */
108
+ strategy: InstructionSyncStrategy;
35
109
  summary: InstructionsSummary;
36
110
  entries: InstructionEntry[];
37
111
  actions: InstructionActionRecord[];
@@ -71,6 +145,11 @@ export interface InstructionsJsonPayload {
71
145
  * exclusion that silently does nothing. Omitted when empty.
72
146
  */
73
147
  exclusionWarnings?: string[];
148
+ /**
149
+ * Structured warnings, the same text written to stderr in human mode.
150
+ * Omitted when empty, so a clean repository's payload shape is unchanged.
151
+ */
152
+ warnings?: InstructionsWarning[];
74
153
  }
75
154
  /**
76
155
  * The resolved exclusion set, split so that intent and effect cannot be
@@ -104,12 +183,30 @@ export interface InstructionsScanDependencies {
104
183
  lstat: (path: string) => Promise<Stats>;
105
184
  realpath: (path: string) => Promise<string>;
106
185
  readFile: (path: string, encoding: 'utf8') => Promise<string>;
186
+ /** Raw bytes, for the byte-exact managed-shim comparisons. */
187
+ readFileBytes: (path: string) => Promise<Buffer>;
107
188
  readlink: (path: string) => Promise<string>;
108
189
  stat: (path: string) => Promise<Stats>;
109
190
  }
110
191
  export interface InstructionsValidateCommandDependencies {
111
192
  buildCommandContext: (options: GlobalOptions) => CommandContext;
112
193
  resolveProjectRoot: (cwd: string) => Promise<string>;
194
+ /**
195
+ * The repository's configured `instructions.claude.shims`, or
196
+ * undefined when the key is absent. Sync inherits it from this interface so
197
+ * both commands resolve the strategy through the same config read.
198
+ */
199
+ readConfiguredInstructionSyncStrategy: (repoRoot: string) => Promise<InstructionSyncStrategy | undefined>;
200
+ /**
201
+ * Every `CLAUDE.md` and `CLAUDE.local.md` in the repository (absolute
202
+ * paths), from a read-only walk that ignores the mutation exclusions, each
203
+ * classified as an exact OAT shim or not.
204
+ */
205
+ findLeftoverClaudeFiles: (repoRoot: string) => Promise<Array<{
206
+ path: string;
207
+ linkedBy: string[];
208
+ exactShim: boolean;
209
+ }>>;
113
210
  /**
114
211
  * The single exclusion path both commands resolve through. Sync inherits it
115
212
  * from this interface rather than resolving its own, so validate can never
@@ -121,6 +218,10 @@ export interface InstructionsValidateCommandDependencies {
121
218
  export interface InstructionsSyncCommandDependencies extends InstructionsValidateCommandDependencies {
122
219
  lstat: (path: string) => Promise<Stats>;
123
220
  readFile: (path: string, encoding: 'utf8') => Promise<string>;
221
+ /** Raw bytes, for the apply-time managed-shim re-verification. */
222
+ readFileBytes: (path: string) => Promise<Buffer>;
223
+ readlink: (path: string) => Promise<string>;
224
+ realpath: (path: string) => Promise<string>;
124
225
  removeFile: (path: string) => Promise<void>;
125
226
  symlinkFile: (target: string, path: string) => Promise<void>;
126
227
  writeFile: (path: string, content: string, encoding: 'utf8') => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.types.d.ts","sourceRoot":"","sources":["../../../src/commands/instructions/instructions.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1E,eAAO,MAAM,2BAA2B,YACtC,SAAS,EACT,SAAS,EACT,MAAM,CACE,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,SAAS,GAAG,kBAAkB,GAAG,OAAO,CAAC;AAEhF,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjE,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAA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,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/E"}
1
+ {"version":3,"file":"instructions.types.d.ts","sourceRoot":"","sources":["../../../src/commands/instructions/instructions.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAKlE,OAAO,EACL,2BAA2B,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GACzB,IAAI,GACJ,SAAS,GACT,kBAAkB,GAClB,OAAO,GACP,cAAc,GACd,WAAW,CAAC;AAEhB,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,gBAAgB,CAAC;IACxB,yEAAyE;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,WAAW,CAAC,EAA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AED,MAAM,WAAW,mCAAoC,SAAQ,uCAAuC;IAClG,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IACxC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9D,kEAAkE;IAClE,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/E"}
@@ -1,5 +1,4 @@
1
- export const INSTRUCTION_SYNC_STRATEGIES = [
2
- 'pointer',
3
- 'symlink',
4
- 'copy',
5
- ];
1
+ // One list shared with the `instructions.claude.shims` config
2
+ // normalizer and `oat config set`, so the commands can never accept a value
3
+ // the config rejects or the reverse.
4
+ export { INSTRUCTION_SYNC_STRATEGIES, } from '../../config/oat-config.js';