pinnedOperativePromptBlock function

String? pinnedOperativePromptBlock(
  1. SkillOperativePins registry
)

Renders the summarizer-input block carrying the verbatim-preserve duty (gh-1409 AC3): the pinned lines must appear VERBATIM in the checkpoint output — the prompt is belt; the carrier is the boundary. Empty pins → null (the section is omitted entirely).

Implementation

String? pinnedOperativePromptBlock(SkillOperativePins registry) {
  if (registry.pins.isEmpty) return null;
  final buffer = StringBuffer(
    'PINNED OPERATIVE LINES (verbatim-preserve duty — every line below is '
    'pinned from a skill manifest and MUST appear VERBATIM, '
    'character-for-character, in the checkpoint output; do not paraphrase, '
    'shorten, translate, or drop any of them):',
  );
  for (final pin in registry.pins) {
    buffer
      ..writeln()
      ..write(_renderPinLine(pin));
  }
  return buffer.toString();
}