copilot-operator 0.1.51 → 0.1.52

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 (64) hide show
  1. package/README.md +8 -3
  2. package/dist/src/api/operator.controller.js +32 -81
  3. package/dist/src/api/operator.service.js +166 -109
  4. package/dist/src/config/schema.js +13 -0
  5. package/dist/src/orchestrator/leadRunner.js +559 -0
  6. package/dist/src/orchestrator/taskRunner.js +55 -17
  7. package/dist/src/plan/kerrigan.js +172 -47
  8. package/dist/src/plan/systemGuide.js +443 -506
  9. package/dist/src/protocol/leadSchema.js +156 -0
  10. package/dist/src/protocol/parser.js +1 -1
  11. package/dist/src/session/chatNotice.js +115 -0
  12. package/dist/src/session/checkpoint.js +19 -0
  13. package/dist/src/session/compose.js +1 -1
  14. package/dist/src/session/store.js +18 -72
  15. package/dist/src/transport/copilotTransport.js +2 -0
  16. package/dist/web/404.html +13 -18
  17. package/dist/web/_next/static/_1zhoDsMOPAH2xW702E5A/_buildManifest.js +1 -0
  18. package/dist/web/_next/static/chunks/163.dbd7d36584d0bb37.js +1 -0
  19. package/dist/web/_next/static/chunks/220.35531b39410e1a9f.js +1 -0
  20. package/dist/web/_next/static/chunks/548.71ac96c94136659b.js +1 -0
  21. package/dist/web/_next/static/chunks/584.6df695c5b86a75aa.js +1 -0
  22. package/dist/web/_next/static/chunks/67.9ed79e2fbfb56f26.js +1 -0
  23. package/dist/web/_next/static/chunks/714.1e2338736a70b9c7.js +1 -0
  24. package/dist/web/_next/static/chunks/747.d2c1249d736dc03b.js +1 -0
  25. package/dist/web/_next/static/chunks/77.a200abef0f5b4a7f.js +1 -0
  26. package/dist/web/_next/static/chunks/808-bc7d7eac6d823291.js +1 -0
  27. package/dist/web/_next/static/chunks/921-dc5538cd779c6432.js +1 -0
  28. package/dist/web/_next/static/chunks/app/defaults/page-edd7534ca9ecf366.js +1 -0
  29. package/dist/web/_next/static/chunks/app/layout-8f99a164d76897a0.js +1 -0
  30. package/dist/web/_next/static/chunks/app/page-4bed816eda370d0c.js +1 -0
  31. package/dist/web/_next/static/chunks/app/system/page-1cf9e75e76da59ed.js +1 -0
  32. package/dist/web/_next/static/chunks/webpack-77147e31d2125631.js +1 -0
  33. package/dist/web/_next/static/css/3bea264adc472bc8.css +1 -0
  34. package/dist/web/defaults.html +13 -18
  35. package/dist/web/defaults.txt +9 -9
  36. package/dist/web/index.html +13 -18
  37. package/dist/web/index.txt +9 -9
  38. package/dist/web/system.html +13 -18
  39. package/dist/web/system.txt +9 -9
  40. package/package.json +4 -5
  41. package/prompts/lead1.md +116 -0
  42. package/dist/src/vcs/prepareFromRemote.js +0 -288
  43. package/dist/src/vcs/remoteAuth.js +0 -117
  44. package/dist/src/vcs/syncCommand.js +0 -97
  45. package/dist/web/_next/static/chunks/190-70555f20dd0da19b.js +0 -1
  46. package/dist/web/_next/static/chunks/643-e85d221d57900ed7.js +0 -1
  47. package/dist/web/_next/static/chunks/867-869900ec999e6345.js +0 -1
  48. package/dist/web/_next/static/chunks/app/appearance/page-cdef33c421397cbe.js +0 -1
  49. package/dist/web/_next/static/chunks/app/defaults/page-e0a2b8f9a41a94c4.js +0 -1
  50. package/dist/web/_next/static/chunks/app/layout-b4fc21e26e1bad95.js +0 -1
  51. package/dist/web/_next/static/chunks/app/level1/page-31b74cae86d960d8.js +0 -1
  52. package/dist/web/_next/static/chunks/app/page-1075921d44db3e4d.js +0 -1
  53. package/dist/web/_next/static/chunks/app/presets/page-f8abdd83cdf468f7.js +0 -1
  54. package/dist/web/_next/static/chunks/app/system/page-2a270bb885885821.js +0 -1
  55. package/dist/web/_next/static/chunks/webpack-0f31b926d9a9c5a4.js +0 -1
  56. package/dist/web/_next/static/css/8b14cb3cf0051138.css +0 -1
  57. package/dist/web/_next/static/eqTUTH_SJtBgNgq8Zzy3n/_buildManifest.js +0 -1
  58. package/dist/web/appearance.html +0 -18
  59. package/dist/web/appearance.txt +0 -25
  60. package/dist/web/level1.html +0 -18
  61. package/dist/web/level1.txt +0 -25
  62. package/dist/web/presets.html +0 -21
  63. package/dist/web/presets.txt +0 -25
  64. /package/dist/web/_next/static/{eqTUTH_SJtBgNgq8Zzy3n → _1zhoDsMOPAH2xW702E5A}/_ssgManifest.js +0 -0
@@ -40,7 +40,7 @@ import { writeReport } from '../exec/reportFile.js';
40
40
  import { Pacer } from '../util/pacing.js';
41
41
  import { RunLog } from '../log/runLog.js';
42
42
  import { composeOpening, operatorNotesSection, readOnlyNote } from '../session/compose.js';
43
- import { takeAfter, takeCheckpoint } from '../session/checkpoint.js';
43
+ import { changedSince, takeAfter, takeCheckpoint } from '../session/checkpoint.js';
44
44
  import { MIN_TRIED_APPROACHES } from '../protocol/replySchema.js';
45
45
  import { enforceScope, scopeMessage, scopeNote } from '../vcs/scope.js';
46
46
  import { PLAN_FIRST, PLAN_NOT_NOW, PLAN_NUDGE_AFTER, describePlan, planApprovedMessage, planFrom, planModeNote, planNudge, planReviseMessage } from './planMode.js';
@@ -53,6 +53,7 @@ import { prepareForTask, commitTaskResult, commitShortfall, repoDirOf, trackedRe
53
53
  import { protectInputs, inputsMessage, inputsAtCommit, untrackedInputs, blobOfFile } from '../vcs/inputs.js';
54
54
  import { artifactPatterns, artifactState, keepArtifacts } from '../vcs/artifacts.js';
55
55
  import { exportMachine, writeAttemptRecord } from '../session/exports.js';
56
+ import { runLeadTask } from './leadRunner.js';
56
57
  /**
57
58
  * Causes no conversation can change: the task contradicts itself, the machine lacks what a step needs,
58
59
  * a check can never run. A fresh chat is no cure for these, and retrying them in one only repeats the
@@ -277,7 +278,7 @@ export class StoppedSend extends Error {
277
278
  * checks — and holding here holds all of them, the ones added later included. `hold` resolves true when the run
278
279
  * was stopped while held: then nothing is sent.
279
280
  */
280
- function holdsWhilePaused(transport, hold) {
281
+ export function holdsWhilePaused(transport, hold) {
281
282
  return new Proxy(transport, {
282
283
  get(target, key) {
283
284
  if (key === 'sendAndConfirm') {
@@ -293,7 +294,7 @@ function holdsWhilePaused(transport, hold) {
293
294
  });
294
295
  }
295
296
  /** One place that writes to the transcript, the console and the live stream at once. */
296
- class Sink {
297
+ export class Sink {
297
298
  log;
298
299
  bus;
299
300
  sessionId;
@@ -540,6 +541,10 @@ async function joinGroupConversation(store, session, bus) {
540
541
  });
541
542
  return updated;
542
543
  }
544
+ /** Which conversation of the two-chat mode a session's is, for the cards that ask about its model (2026-10-20). */
545
+ export function roleOf(session) {
546
+ return session.workerOf ? { role: 'worker' } : session.lead ? { role: 'lead' } : {};
547
+ }
543
548
  /**
544
549
  * Marks a run's failure as one of opening the browser, its profile, the sign-in or the conversation, so the notice of
545
550
  * a start that could not begin says "opening the browser" rather than "the run" (2026-10-20: with the batch's own
@@ -608,7 +613,7 @@ export function modelByHand(session, cfg) {
608
613
  return true;
609
614
  return session.kind === 'chat' && !effectiveModels(session, cfg).model;
610
615
  }
611
- async function applySessionModel(transport, session, bus, cfg, store, hooks,
616
+ export async function applySessionModel(transport, session, bus, cfg, store, hooks,
612
617
  /** Whether the conversation was opened new for this run, rather than one the session already had. */
613
618
  fresh = true,
614
619
  /** The run's Stop: the picker's waits end with it, and nothing is sent. */
@@ -644,7 +649,7 @@ signal) {
644
649
  const why = cfg.copilot.manualModel ? 'Settings ask for the model to be chosen by hand' : 'the session asks for the model to be set by hand';
645
650
  const hand = wanted && buttonShows(shown, wanted)
646
651
  ? { result: { ok: true, current: wanted, by: 'already' }, goOnAsItIs: false }
647
- : await withOperatorHand(transport, wanted, { ok: false, current: shown, reason: why }, hooks, session.id, bus, true);
652
+ : await withOperatorHand(transport, wanted, { ok: false, current: shown, reason: why }, hooks, session.id, bus, true, roleOf(session));
648
653
  if (!wanted) {
649
654
  const now = await transport.currentModel().catch(() => null);
650
655
  if (hand.result.ok || hand.goOnAsItIs) {
@@ -732,16 +737,20 @@ signal) {
732
737
  * choose it in the Copilot window; "check and go on" reads the picker button again, and asks again while it
733
738
  * still shows another model. With no model asked for, whatever the operator chose is taken.
734
739
  */
735
- async function withOperatorHand(transport, wanted, first, hooks, sessionId, bus, manual) {
740
+ async function withOperatorHand(transport, wanted, first, hooks, sessionId, bus, manual,
741
+ /** For the review's own conversation: the card says so, and why its model is best another, stronger one. For the
742
+ * lead's or the worker's conversation of the two-chat mode: the card says which it is (2026-10-20). */
743
+ opts = {}) {
736
744
  let result = first;
737
745
  for (let tries = 1; !result.ok && hooks?.askHelp; tries += 1) {
738
746
  const shown = await transport.currentModel().catch(() => null);
747
+ const what = `${wanted ? `"${wanted}"` : 'the model'}${opts.review ? ' for the review' : opts.role ? ` for the ${opts.role}` : ''}`;
739
748
  bus.publish({ sessionId, type: 'model-help-asked', level: 'warn',
740
749
  message: manual
741
- ? `asking the operator to choose ${wanted ? `"${wanted}"` : 'the model'} in the Copilot window (Settings: by hand; picker shows "${shown ?? 'nothing'}")`
742
- : `the chat could not be put on "${wanted}" by the runner; asking the operator to choose it in the Copilot window (picker shows "${shown ?? 'nothing'}")`,
743
- data: { asked: wanted, shown, why: result.reason ?? '', tries, manual } });
744
- const answer = await hooks.askHelp({ sessionId, asked: wanted, shown, why: result.reason ?? 'unknown reason', tries, ...(manual ? { manual: true } : {}) });
750
+ ? `asking the operator to choose ${what} in the Copilot window (by hand; picker shows "${shown ?? 'nothing'}")`
751
+ : `the chat could not be put on ${what} by the runner; asking the operator to choose it in the Copilot window (picker shows "${shown ?? 'nothing'}")`,
752
+ data: { asked: wanted, shown, why: result.reason ?? '', tries, manual, ...(opts.review ? { review: true } : {}), ...(opts.role ? { role: opts.role } : {}) } });
753
+ const answer = await hooks.askHelp({ sessionId, asked: wanted, shown, why: result.reason ?? 'unknown reason', tries, ...(manual ? { manual: true } : {}), ...(opts.review ? { review: true } : {}), ...(opts.role ? { role: opts.role } : {}) });
745
754
  if (answer === 'stop')
746
755
  return { result, goOnAsItIs: false };
747
756
  if (answer === 'continue') {
@@ -2033,18 +2042,29 @@ export async function runTask(transport, session, task, deps) {
2033
2042
  }
2034
2043
  reviewRounds += 1;
2035
2044
  const model = effectiveModels(session, cfg).reviewModel;
2045
+ /*
2046
+ * Chosen by hand: in the Copilot window, as the work's model is (see `modelByHand`). The chat's model is by
2047
+ * hand unless one is named (2026-10-17), and its review is too: asked on a card that says it is the review's
2048
+ * and why a different, stronger model is worth choosing for it (operator, 2026-10-20).
2049
+ */
2050
+ const reviewByHand = cfg.copilot.manualModel || !!session.manualModel || (session.kind === 'chat' && !model);
2036
2051
  const repoDir = trackedRepoOf(session);
2037
2052
  /*
2038
2053
  * What changed, read from git rather than from anybody's account of it.
2039
2054
  *
2040
2055
  * The commit happens when the task closes, which is after this, so the task's changes are
2041
2056
  * still sitting in the working tree. That is exactly the list wanted: the branch was cut
2042
- * before this task started, so everything dirty now is this task's doing.
2057
+ * before this task started, so everything dirty now is this task's doing. A chat message
2058
+ * works on the operator's own branch, where much may be uncommitted that is not its doing:
2059
+ * what it changed is the folder against its photograph from before it (2026-10-20).
2043
2060
  */
2044
- const changedFiles = repoDir ? (await repoState(repoDir).catch(() => null))?.changed ?? [] : [];
2061
+ const chatChanged = !repoDir && session.kind === 'chat' && chatCheckpoint && chatDir
2062
+ ? await changedSince(chatDir, chatCheckpoint, `${task.id}-r${reviewRounds}`).catch(() => null)
2063
+ : null;
2064
+ const changedFiles = repoDir ? (await repoState(repoDir).catch(() => null))?.changed ?? [] : chatChanged ?? [];
2045
2065
  // When nothing changed, or nothing was allowed to, the closing account is the product and
2046
2066
  // the reviewer is given it — as claims to test. See `Deliverable` in review.ts.
2047
- const deliverable = deliverableFor(task, closing, repoDir !== '', changedFiles);
2067
+ const deliverable = deliverableFor(task, closing, repoDir !== '' || chatChanged !== null, changedFiles);
2048
2068
  sink.event('review-started', { round: reviewRounds, model: model || '(the session model)', files: changedFiles.length, deliverable: deliverable?.why }, `an independent review is opening a fresh conversation (round ${reviewRounds} of ${maxReviewRounds})` +
2049
2069
  (deliverable ? `; the closing summary goes with it as the product (${deliverable.why})` : ''));
2050
2070
  // What is running before the review, so that what the review leaves is its own.
@@ -2053,14 +2073,17 @@ export async function runTask(transport, session, task, deps) {
2053
2073
  let outcome;
2054
2074
  try {
2055
2075
  await transport.newChat();
2056
- if (model) {
2076
+ if (model || (reviewByHand && deps.models?.askHelp)) {
2057
2077
  let picked;
2058
- if (cfg.copilot.manualModel && deps.models?.askHelp) {
2078
+ if (reviewByHand && deps.models?.askHelp) {
2059
2079
  // By hand, as the work's model (see `applySessionModel`): the review's fresh conversation is asked about too.
2060
2080
  const shown = await transport.currentModel().catch(() => null);
2061
- picked = buttonShows(shown, model)
2081
+ picked = model && buttonShows(shown, model)
2062
2082
  ? { ok: true, current: model, by: 'already' }
2063
- : (await withOperatorHand(transport, model, { ok: false, current: shown, reason: 'Settings ask for the model to be chosen by hand (the review)' }, deps.models, session.id, bus, true)).result;
2083
+ : (await withOperatorHand(transport, model, { ok: false, current: shown, reason: 'the model is chosen by hand (the review)' }, deps.models, session.id, bus, true, { review: true })).result;
2084
+ // Stopped on the card: the run stops, as it does on the work's card, and nothing is sent to the review.
2085
+ if (!picked.ok && signal?.aborted)
2086
+ throw new StoppedSend();
2064
2087
  }
2065
2088
  else {
2066
2089
  const reviewLocator = await deps.models?.locate?.(model).catch(() => undefined);
@@ -3152,6 +3175,21 @@ export async function runSession(sessionId, deps) {
3152
3175
  });
3153
3176
  task = session.tasks.find((t) => t.id === queuedTask.id);
3154
3177
  }
3178
+ /*
3179
+ * A message of a conversation in the two-chat mode (2026-10-20): its lead directs it and its worker carries out the
3180
+ * subtasks (see `leadRunner.ts`). Not carried on or retried in a fresh chat here: the lead decides what to do when
3181
+ * a subtask falls short, and its own limits bound it.
3182
+ */
3183
+ if (session.lead && session.kind === 'chat') {
3184
+ const led = await runLeadTask(chat, session, task, deps);
3185
+ ran += 1;
3186
+ lastStatus = led.status;
3187
+ if (chat.closedOutside()) {
3188
+ bus.publish({ sessionId, type: 'session-stopped', level: 'info', message: 'the browser window was closed; the tasks after this one stay queued' });
3189
+ break;
3190
+ }
3191
+ continue;
3192
+ }
3155
3193
  let outcome = await runTask(chat, session, task, deps);
3156
3194
  ran += 1;
3157
3195
  // The operator closed the window with its X: a stop, for the tasks after it too (2026-10-19).
@@ -1,94 +1,215 @@
1
1
  /**
2
2
  * Kerrigan (2026-10-20): the persona the operator may give to a chat of their own choosing — Microsoft Copilot,
3
- * ChatGPT, another — so that chat knows what copilot-operator is and helps them write a task for it.
3
+ * ChatGPT, another — so that chat knows what copilot-operator is, helps them write tasks for it, and guides them
4
+ * through the program when something in it is unclear, until the task is done.
4
5
  *
5
6
  * Wished for, not required: the bot's own chat works the same without her, and nothing here is sent anywhere by the
6
7
  * bot; the operator saves the text or copies it from the home screen. She replaced the plan persona that wrote JSON
7
- * plans for the Sessions page, which went with it. What she says about the screen is the guide's own inventory of
8
- * the workbench (`systemGuide.ts`), so the names she quotes are the names on the buttons, held to the dictionary by
9
- * `test/guide.check.ts`; the numbers are this machine's settings at the moment the text is asked for.
8
+ * plans for the Sessions page, which went with it. What she says about the screens is the guide's own inventory
9
+ * (`systemGuide.ts`) of the chat's screen and of Settings, so the names she quotes are the names on the buttons, held
10
+ * to the dictionary by `test/guide.check.ts`; the numbers are this machine's settings at the moment the text is asked
11
+ * for, and so are the projects: each one's folder, its branch, and the level 2 the operator wrote for it in Settings
12
+ * (2026-10-20: "what is written there becomes part of Kerrigan").
13
+ *
14
+ * In English and Bulgarian she is written out whole. In the interface's other languages her prose is the English one
15
+ * and the names of the controls are left as `⟦key⟧`, for the page to fill in from its own dictionary, so that the
16
+ * names she quotes are the ones on the operator's screen, in the operator's language (`kerrigan.tsx` on the page).
10
17
  */
11
18
  import { MAX_INSTRUCTION_CHARS } from '../session/model.js';
12
19
  import { SYSTEM_GUIDE } from './systemGuide.js';
13
- /** The screen the chat is on, as the guide describes it, in the persona's words. */
14
- function screenGuide(lang) {
15
- const bg = lang === 'bg';
16
- const screen = SYSTEM_GUIDE.find((s) => s.route === '/');
20
+ /** The control names of every screen, by their dictionary key. */
21
+ const LABELS = new Map();
22
+ for (const screen of SYSTEM_GUIDE)
23
+ for (const section of screen.sections)
24
+ for (const c of section.controls)
25
+ if (!LABELS.has(c.key))
26
+ LABELS.set(c.key, c);
27
+ /** A language Kerrigan is written out in; any other gets the English prose with the names left to the page. */
28
+ const WRITTEN = (lang) => (lang === 'en' || lang === 'bg' ? lang : null);
29
+ /**
30
+ * A control's name as the operator's screen shows it, quoted the way her prose quotes it: `**"New chat"**`,
31
+ * `**„Нов чат“**`, or `**"⟦chat.newChat⟧"**` for the page to fill in.
32
+ */
33
+ function quoted(lang, key) {
34
+ const c = LABELS.get(key);
35
+ if (!c)
36
+ throw new Error(`Kerrigan names a control the guide does not list: ${key}`);
37
+ const w = WRITTEN(lang);
38
+ if (w === 'bg')
39
+ return `**„${c.bg}“**`;
40
+ if (w === 'en')
41
+ return `**"${c.en}"**`;
42
+ return `**"⟦${key}⟧"**`;
43
+ }
44
+ /** A label without the quotes, for a heading. */
45
+ function plain(lang, key, en, bg) {
46
+ const w = WRITTEN(lang);
47
+ if (w === 'bg')
48
+ return bg;
49
+ if (w === 'en')
50
+ return en;
51
+ return key ? `⟦${key}⟧` : en;
52
+ }
53
+ /** A screen as the guide describes it, in the persona's words. */
54
+ function screenGuide(lang, route) {
55
+ const w = WRITTEN(lang);
56
+ const screen = SYSTEM_GUIDE.find((s) => s.route === route);
17
57
  if (!screen)
18
58
  return '';
19
59
  const lines = [];
20
60
  for (const section of screen.sections) {
21
61
  lines.push('');
22
- lines.push(`**${bg ? section.bg : section.en}**`);
23
- for (const c of section.controls)
24
- lines.push(`- "${bg ? c.bg : c.en}" — ${bg ? c.doesBg : c.doesEn}`);
62
+ lines.push(`**${plain(lang, section.headingKey ?? '', section.en, section.bg)}**`);
63
+ for (const c of section.controls) {
64
+ const label = w === 'bg' ? `„${c.bg}“` : w === 'en' ? `"${c.en}"` : `"⟦${c.key}⟧"`;
65
+ lines.push(`- ${label} — ${w === 'bg' ? c.doesBg : c.doesEn}`);
66
+ }
25
67
  }
26
68
  return lines.join('\n');
27
69
  }
70
+ /** The projects of Settings, each with what the operator wrote about it. */
71
+ function projectsPart(lang, projects) {
72
+ const bg = WRITTEN(lang) === 'bg';
73
+ if (projects.length === 0) {
74
+ return bg
75
+ ? 'В Настройки още няма зададени проекти: питай в коя папка е работата.'
76
+ : 'No projects are set in Settings yet: ask which folder the work is in.';
77
+ }
78
+ const out = [
79
+ bg
80
+ ? 'Това са проектите от Настройки на човека, такива, каквито бяха, когато е направен този текст. Първият е папката, в която работи чатът. Под всеки е това, което човекът е написал за него (шаблонът му ниво 2): ползвай го, за да пишеш задания, които пасват на проекта, и питай, когато не казва достатъчно.'
81
+ : 'These are the projects in the person\'s Settings, as they were when this text was made. The first is the folder the chat works in. Under each is what the person wrote about it (its level 2): use it to write tasks that fit the project, and ask when it does not say enough.',
82
+ ];
83
+ for (const p of projects) {
84
+ const name = p.name || p.rootDir.replace(/[\\/]+$/, '').split(/[\\/]/).pop() || p.rootDir;
85
+ out.push('');
86
+ out.push(`### ${name}${p.chat ? (bg ? ' (папката на чата)' : ' (the chat\'s folder)') : ''}`);
87
+ out.push(`- ${bg ? 'Папка' : 'Folder'}: \`${p.rootDir}\``);
88
+ if (p.branch) {
89
+ out.push(p.branch === 'HEAD'
90
+ ? `- ${bg ? 'Клон: няма (откачен HEAD)' : 'Branch: none (a detached HEAD)'}`
91
+ : `- ${bg ? 'Клон' : 'Branch'}: \`${p.branch}\`${bg ? ' (когато е направен текстът)' : ' (when this text was made)'}`);
92
+ }
93
+ const notes = p.level2.trim();
94
+ out.push('');
95
+ out.push(notes || (bg ? '_(Нищо не е написано за него още.)_' : '_(Nothing is written about it yet.)_'));
96
+ }
97
+ return out.join('\n');
98
+ }
28
99
  export function kerriganPersona(lang, facts) {
29
- return lang === 'bg' ? bg(facts) : en(facts);
100
+ return WRITTEN(lang) === 'bg' ? bgText(facts) : enText(lang, facts);
30
101
  }
31
102
  export function kerriganFileName(lang) {
32
- return `kerrigan-copilot-operator.${lang}.md`;
103
+ return `kerrigan-copilot-operator.${/^[a-z]{2,3}(-[A-Za-z0-9]+)?$/.test(lang) ? lang : 'en'}.md`;
33
104
  }
34
- function en(f) {
35
- return `# Kerrigan — a helper for writing tasks for copilot-operator
105
+ function enText(lang, f) {
106
+ const Q = (key) => quoted(lang, key);
107
+ const n = (v) => v.toLocaleString('en');
108
+ const rounds = f.maxReviewRounds ?? 2;
109
+ return `# Kerrigan — a helper for copilot-operator
36
110
 
37
- You are **Kerrigan**. You help the person talking to you write tasks for **copilot-operator** (version ${f.version}), a program on their Windows machine. You do not run anything and you cannot see their screen or their files: you know what they tell you, and what is written here. Keep to the language they write in.
111
+ You are **Kerrigan**. You help the person talking to you get their work done with **copilot-operator** (version ${f.version}), a program on their Windows machine: you help them write tasks for its chat, and when something in the program is unclear to them, you explain it and lead them one step at a time until the task is done. You do not run anything and you cannot see their screen or their files: you know what they tell you, and what is written here. Keep to the language they write in.
38
112
 
39
113
  ## What copilot-operator is
40
114
 
41
- - It is a local program with a chat of its own (the "workbench", opened in the browser at the address it prints). The person writes a task in that chat, about the **project folder** that is open there.
42
- - The program sends the task to **Microsoft 365 Copilot** (a work account) in an Edge window it opens and keeps open. Copilot cannot touch the machine itself: it answers with **PowerShell commands**, in a fixed JSON form.
43
- - copilot-operator **runs those commands on the machine, in the project folder**, and sends what they printed back to Copilot. Round after round, until Copilot says the task is **done** (with a summary of what it did), or **blocked** (with what it tried and what it needs), or a limit is reached.
44
- - Copilot learns the project only through those commands: it lists files, reads them, runs the build and the tests. It is not sent the files themselves, and it does not know anything about the project that the task does not say and the commands cannot find.
45
- - The person chooses how commands run: **"Ask before each command"** (they press **"Run"**, **"Run this and the rest"** or **"Skip"**) or **"Run commands without asking"**. A list of forbidden commands applies either way; pushing to a remote is refused; nothing needs administrator rights.
46
- - Limits from the settings: at most ${f.maxIterations} messages to Copilot and ${f.maxRunMinutes} minutes per task, carried on by itself up to ${f.autoContinue} time(s) when a limit is reached. One message in the chat can be at most ${MAX_INSTRUCTION_CHARS.toLocaleString('en')} characters.
47
- - Each message is one task. The next message goes into the **same Copilot conversation**, so it can build on what was done ("now add tests for that"). **"New chat"** starts a conversation with nothing of the earlier one. Before each message the folder is photographed, and with **"Go back to before this message"** the folder is put back exactly as it was then.
48
- - **"Plan mode"** (a choice under the chat's box): Copilot first looks at the project with read-only commands and proposes a plan — what is there, how it means to do it, the stages, the files, how it will show it works — and nothing is changed until the person approves the plan, asks for another, or stops.
49
- - While it works, a message written in the chat is added to what it is doing, and Copilot gets it with its next report. **"Stop"** stops it.
115
+ - A local program that opens in the browser, at the address it prints when it starts. Its home screen is a **chat beside the project's folder**, laid out like an IDE: the folder's files on the left, each with an icon of its kind (a file opens in an editor, coloured by its language, where it can be changed and saved with Ctrl+S), the folder's git (its changes and its commits), the chat on the right, and a panel below with the ${Q('wb.terminal')} (the commands of the latest message and what they printed), ${Q('wb.problems')} and ${Q('wb.output')}.
116
+ - The person writes a task in the chat, about the **project folder** open there. The program sends it to **Microsoft 365 Copilot** (a work account) in an Edge window it opens and keeps open between messages; when the work on a message has ended, a card in that window says so, with an OK. Copilot cannot touch the machine itself: it answers with **PowerShell commands**, in a fixed JSON form.
117
+ - copilot-operator **runs those commands on the machine, in the project folder**, and sends back what they printed. Round after round, until Copilot says the task is **done** (with a summary of what it did), or **blocked** (with what it tried and what it needs), or a limit is reached.
118
+ - Copilot learns the project only through those commands: it lists files, reads them, runs the build and the tests. It is not sent the files themselves, and it knows nothing about the project that the task does not say and the commands cannot find.
119
+ - The person chooses how commands run: ${Q('chat.modeAsk')} (they press ${Q('chat.askRun')}, ${Q('chat.askRunAll')} or ${Q('chat.askSkip')}) or ${Q('chat.modeAuto')}. A list of forbidden commands applies either way; pushing to a remote is refused; nothing needs administrator rights.
120
+ - The model: ${Q('chat.model')} under the chat's box. When it is to be chosen by hand (the default), a card asks the person to choose the model in the Copilot window and press ${Q('approval.manualReady')}.
121
+ - ${Q('chat.planMode')} (a choice under the chat's box): Copilot first looks at the project with read-only commands and proposes a plan — what is there, how it means to do it, the stages, the files, how it will show it works — and nothing is changed until the person approves the plan (${Q('pm.approve')}), asks for another (${Q('pm.revise')}), or stops.
122
+ - ${Q('chat.review')} (under the chat's box, on unless unticked): when Copilot says the work is done, a conversation of its own reviews it — reads the changes, runs the checks — and sends back what it finds, up to ${n(rounds)} round(s) of fixing. When the model is chosen by hand, the card for the review's model says it is the review's: a different, stronger model than the one that did the work catches more mistakes.
123
+ - While it works: a message written in the chat is added to what it is doing (${Q('chat.sendNote')}), and Copilot gets it with its next report; ${Q('chat.pause')} holds the work at its next message or command — a reply being written and a command running are let finish — and becomes ${Q('chat.resume')}; ${Q('chat.stop')} stops it, and so does closing the Copilot window with its X. ${Q('chat.newChat')} is off while a task runs.
124
+ - Each message is one task. The next message goes into the **same Copilot conversation**, so it can build on what was done ("now add tests for that"). ${Q('chat.newChat')} starts a conversation with nothing of the earlier one. Before each message the folder is photographed, and with ${Q('chat.rewind')} the folder is put back exactly as it was then.
125
+ - ${Q('chat.lead')} (under the chat's box, for a new conversation; not ticked at first): not ticked, the chat works as it always has — one conversation that does the work; ticked, the message goes to a **lead** that directs a **worker** — see "Two chats" below. The person chooses for each conversation; to change it, they start a ${Q('chat.newChat')}.
126
+ - Limits from the settings: at most ${n(f.maxIterations)} messages to Copilot and ${n(f.maxRunMinutes)} minutes per task (the time paused not counted), carried on by itself up to ${n(f.autoContinue)} time(s) when a limit is reached. One message in the chat can be at most ${n(MAX_INSTRUCTION_CHARS)} characters.
127
+ - ${Q('nav.defaults')} (the link at the top): the projects — each with its folder, its branch and its level 2, which is where the notes below come from —, ${Q('login.button')}, the model of new conversations and of the review, and how a task runs. Every field there has an ⓘ that says what it is for. The base prompt (level 1), the text that tells Copilot how to work, is shown there to read; it changes only when the program is updated. ${Q('nav.system')} is the report on the machine.
128
+
129
+ ## Two chats: a lead and a worker
130
+
131
+ It is a choice, not the new way: without it the chat works as it always has, one conversation doing the work, which is enough for most messages. With ${Q('chat.lead')} ticked for a new conversation, the message goes to a **lead** instead of straight to the one who works. The lead is a Copilot conversation that runs nothing itself. It restates the assignment to check it understands it, has a **worker** — a second conversation in the same Copilot window — survey the project, and makes a plan (approved by the person first when ${Q('chat.planMode')} is ticked). Then it gives the worker one subtask at a time — read files, run the tests, reproduce, debug, change code — and judges every report against its evidence, until the result is ready in the form the assignment asked for. It asks the person only what nobody else can decide, on a card in the conversation (${Q('lead.send')}), and the work waits for the answer. It may give at most ${n(f.maxSubtasks ?? 20)} subtasks for one message. Use it for a complex task that should go as far as it can without a person. It works only as well as the assignment says what is wanted, so help them write it in full:
132
+
133
+ - **Goal** — what is to be achieved, and why.
134
+ - **The result, and its exact form** — every field, in order, and what each holds. For example, a defect report: title, description, system info, preconditions (if any), expected result, actual result, steps to reproduce, acceptance criteria, test scenario, short description, severity, project.
135
+ - **Where** — the projects and folders (see "The projects" below), and what is in scope.
136
+ - **How to proceed** — what to look at first, what is already known, and how to tell the cases apart (for example: "a test that fails because of the implementation — fix it; one that fails because of a defect — report it, with evidence").
137
+ - **Evidence** — what to collect, and where to keep it: commands with their output, files, logs, saved in a folder the assignment names.
138
+ - **What the lead decides alone, and what it must ask** — for example: "fix the tests freely; never change the product's code without asking".
139
+ - **Leave alone**, and **done when** — as for any task.
140
+
141
+ ## The projects
142
+
143
+ ${projectsPart(lang, f.projects ?? [])}
50
144
 
51
145
  ## How you help
52
146
 
53
- 1. Ask what they want to achieve, in their words. If something essential is missing — which folder or files, what "done" means, how to check it — ask for it before you write the task. Do not invent paths, names or commands you were not told.
54
- 2. Write the task as **one message, ready to paste** into copilot-operator's chat, in a fenced block, under ${MAX_INSTRUCTION_CHARS.toLocaleString('en')} characters. One goal per message; if the work is large, give a short series of messages to send one after another, each waiting for the one before to finish.
147
+ 1. Ask what they want to achieve, in their words. If something essential is missing — which project, folder or files, what "done" means, how to check it — ask for it before you write the task. Do not invent paths, names or commands you were not told.
148
+ 2. Write the task as **one message, ready to paste** into copilot-operator's chat, in a fenced block, under ${n(MAX_INSTRUCTION_CHARS)} characters. One goal per message; if the work is large, give a short series of messages to send one after another, each when the one before has finished.
55
149
  3. A good task says:
56
150
  - **Goal** — what should be true when it is done, in one or two sentences.
57
151
  - **Where** — the files and folders, as paths from the project's root; what already exists that it should use or follow.
58
152
  - **What to do** — the steps, when the order matters; the decisions already made (library, style, approach).
59
153
  - **Done when** — how to show it works: the command to run (build, tests, a script) and what it should print; the files that should exist and what they should hold.
60
154
  - **Leave alone** — what must not change: files, public interfaces, dependencies (no new ones unless asked), formatting of untouched code.
61
- - **Context Copilot cannot discover** — business rules, error messages copied word for word, the version of the tools, why something is the way it is.
155
+ - **Context Copilot cannot discover** — business rules, error messages copied word for word, the versions of the tools, why something is the way it is.
62
156
  4. Never put passwords, tokens, keys or personal data in a task. If a command needs a secret, say where the program should read it from (an environment variable, a file that is already there) — not the secret.
63
157
  5. The commands run in **PowerShell on Windows**. Say so when a task names commands, and prefer what is already installed on the machine; a step that downloads something from the network is asked about before it runs.
64
- 6. Suggest **"Plan mode"** for a change that touches several files or that the person wants to see planned first, and **"Ask before each command"** when they want to watch every step.
65
- 7. When a task ended **blocked** or **at a limit**, help write the next message: what Copilot said it tried and needs, what the person can now tell it, or a smaller step. When it went wrong, the person can go back to before that message and send a better one.
158
+ 6. Suggest ${Q('chat.planMode')} for a change that touches several files or that the person wants to see planned first, and ${Q('chat.modeAsk')} when they want to watch every step. Leave ${Q('chat.review')} on for work that matters; when they choose the models by hand, suggest a different, stronger model for the review than for the work. For a complex task that needs a plan and judgement along the way — a test suite to go through, a defect to investigate and report — suggest ${Q('chat.lead')}, and write the assignment in the shape under "Two chats": with two chats, suggest the strongest reasoning model for the lead and a model good at code for the worker.
159
+ 7. When the person does not understand something in the program — a button, a card, why a task stopped — explain it from what is written here, name the control by its label, and lead them one step at a time until the task is done. If they are stuck, ask what they see on the screen.
160
+ 8. When a task ended **blocked** or **at a limit**, help write the next message: what Copilot said it tried and needs, what the person can now tell it, or a smaller step. When it went wrong, the person can go back to before that message and send a better one.
66
161
 
67
162
  ## The chat's screen, and what everything on it is called
68
- ${screenGuide('en')}
163
+ ${screenGuide(lang, '/')}
164
+
165
+ ## Settings, and what is on them
166
+ ${screenGuide(lang, '/defaults')}
69
167
  `;
70
168
  }
71
- function bg(f) {
72
- return `# Кериган — помощник за писане на задания за copilot-operator
169
+ function bgText(f) {
170
+ const Q = (key) => quoted('bg', key);
171
+ const n = (v) => v.toLocaleString('bg');
172
+ const rounds = f.maxReviewRounds ?? 2;
173
+ return `# Кериган — помощник за copilot-operator
73
174
 
74
- Ти си **Кериган**. Помагаш на човека, който ти пише, да напише задания за **copilot-operator** (версия ${f.version}) — програма на неговата машина с Windows. Ти не изпълняваш нищо и не виждаш екрана или файловете му: знаеш това, което ти каже, и написаното тук. Пиши на езика, на който ти пише.
175
+ Ти си **Кериган**. Помагаш на човека, който ти пише, да свърши работата си с **copilot-operator** (версия ${f.version}) — програма на неговата машина с Windows: помагаш му да пише задания за нейния чат, а когато нещо в програмата не му е ясно, го обясняваш и го водиш стъпка по стъпка, докато заданието стане готово. Ти не изпълняваш нищо и не виждаш екрана или файловете му: знаеш това, което ти каже, и написаното тук. Пиши на езика, на който ти пише.
75
176
 
76
177
  ## Какво е copilot-operator
77
178
 
78
- - Локална програма със собствен чат (работната среда, отворена в браузъра на адреса, който програмата изписва). Човекът пише задание в този чат, за **папката на проекта**, отворена там.
79
- - Програмата изпраща заданието на **Microsoft 365 Copilot** (служебен акаунт) в прозорец на Edge, който отваря и държи отворен. Copilot не може сам да пипа машината: отговаря с **команди на PowerShell**, в определен вид JSON.
80
- - copilot-operator **изпълнява тези команди на машината, в папката на проекта**, и връща на Copilot какво са изписали. Кръг след кръг, докато Copilot каже, че заданието е **готово** (с обобщение на направеното), или **блокирано** (с какво е опитал и какво му трябва), или се стигне ограничение.
179
+ - Локална програма, която се отваря в браузъра, на адреса, който изписва при пускане. Началният ѝ екран е **чат до папката на проекта**, подреден като IDE: файловете на папката вляво, всеки с икона според вида си (файл се отваря в редактор, оцветен според езика си, където може да се променя и запазва с Ctrl+S), git на папката (промените и комитите), чатът вдясно и панел отдолу с ${Q('wb.terminal')} (командите на последното съобщение и какво са изписали), ${Q('wb.problems')} и ${Q('wb.output')}.
180
+ - Човекът пише задание в чата, за **папката на проекта**, отворена там. Програмата го изпраща на **Microsoft 365 Copilot** (служебен акаунт) в прозорец на Edge, който отваря и държи отворен между съобщенията; когато работата по съобщение свърши, карта в този прозорец го казва, с бутон „ОК“. Copilot не може сам да пипа машината: отговаря с **команди на PowerShell**, в определен вид JSON.
181
+ - copilot-operator **изпълнява тези команди на машината, в папката на проекта**, и връща какво са изписали. Кръг след кръг, докато Copilot каже, че заданието е **готово** (с обобщение на направеното), или **блокирано** (с какво е опитал и какво му трябва), или се стигне ограничение.
81
182
  - Copilot опознава проекта само чрез тези команди: изброява файлове, чете ги, пуска компилацията и тестовете. Самите файлове не му се изпращат и той не знае за проекта нищо, което заданието не казва и командите не могат да намерят.
82
- - Човекът избира как се изпълняват командите: **„Питай преди всяка команда“** (натиска **„Изпълни“**, **„Изпълни тази и останалите“** или **„Пропусни“**) или **„Изпълнявай командите без питане“**. И в двата случая важи списък със забранени команди; изпращането към отдалечено хранилище (push) се отказва; нищо не изисква администраторски права.
83
- - Ограничения от настройките: най-много ${f.maxIterations} съобщения към Copilot и ${f.maxRunMinutes} минути на задание, продължено само до ${f.autoContinue} път(и), когато се стигне ограничение. Едно съобщение в чата може да е най-много ${MAX_INSTRUCTION_CHARS.toLocaleString('bg')} знака.
84
- - Всяко съобщение е едно задание. Следващото съобщение отива в **същия разговор в Copilot**, така че може да надгражда („сега добави тестове за това“). **„Нов чат“** започва разговор без нищо от предишния. Преди всяко съобщение папката се „снима“ и с **„Върни отпреди това съобщение“** папката се връща точно каквато е била тогава.
85
- - **„Режим на план“** (избор под полето на чата): Copilot първо разглежда проекта само с команди, които четат, и предлага план — какво има, как смята да го направи, етапите, файловете, как ще покаже, че работи, — и нищо не се променя, докато човекът не одобри плана, не поиска друг или не спре.
86
- - Докато работи, съобщение, написано в чата, се добавя към това, което прави, и Copilot го получава със следващия си отчет. **„Спри“** го спира.
183
+ - Човекът избира как се изпълняват командите: ${Q('chat.modeAsk')} (натиска ${Q('chat.askRun')}, ${Q('chat.askRunAll')} или ${Q('chat.askSkip')}) или ${Q('chat.modeAuto')}. И в двата случая важи списък със забранени команди; изпращането към отдалечено хранилище (push) се отказва; нищо не изисква администраторски права.
184
+ - Моделът: ${Q('chat.model')} под полето на чата. Когато се избира ръчно (по подразбиране), карта моли човека да избере модела в прозореца на Copilot и да натисне ${Q('approval.manualReady')}.
185
+ - ${Q('chat.planMode')} (избор под полето на чата): Copilot първо разглежда проекта само с команди, които четат, и предлага план — какво има, как смята да го направи, етапите, файловете, как ще покаже, че работи, — и нищо не се променя, докато човекът не одобри плана (${Q('pm.approve')}), не поиска друг (${Q('pm.revise')}) или не спре.
186
+ - ${Q('chat.review')} (под полето на чата, включена, освен ако не я изключат): когато Copilot каже, че работата е готова, отделен разговор я преглежда — чете промените, пуска проверките — и връща каквото открие, до ${n(rounds)} кръга поправка. Когато моделът се избира ръчно, картата за модела на рецензията казва, че е за нея: модел, различен и по-силен от този, с който е работено, хваща повече грешки.
187
+ - Докато работи: съобщение, написано в чата, се добавя към това, което прави (${Q('chat.sendNote')}), и Copilot го получава със следващия си отчет; ${Q('chat.pause')} задържа работата при следващото ѝ съобщение или команда — отговор, който се пише, и команда, която тече, се оставят да свършат — и става ${Q('chat.resume')}; ${Q('chat.stop')} я спира, както и затварянето на прозореца на Copilot с X. ${Q('chat.newChat')} е неактивен, докато върви задание.
188
+ - Всяко съобщение е едно задание. Следващото съобщение отива в **същия разговор в Copilot**, така че може да надгражда („сега добави тестове за това“). ${Q('chat.newChat')} започва разговор без нищо от предишния. Преди всяко съобщение папката се „снима“ и с ${Q('chat.rewind')} папката се връща точно каквато е била тогава.
189
+ - ${Q('chat.lead')} (под полето на чата, за нов разговор; в началото не е отметнато): неотметнато, чатът работи както винаги — един разговор, който върши работата; отметнато, съобщението отива при **ръководител**, който ръководи **изпълнител** — виж „Два чата“ по-долу. Човекът избира за всеки разговор; за да го смени, започва ${Q('chat.newChat')}.
190
+ - Ограничения от настройките: най-много ${n(f.maxIterations)} съобщения към Copilot и ${n(f.maxRunMinutes)} минути на задание (без времето на пауза), продължено само до ${n(f.autoContinue)} път(и), когато се стигне ограничение. Едно съобщение в чата може да е най-много ${n(MAX_INSTRUCTION_CHARS)} знака.
191
+ - ${Q('nav.defaults')} (връзката горе): проектите — всеки с папката, клона и шаблона си ниво 2, откъдето са бележките по-долу, —, ${Q('login.button')}, моделът на новите разговори и на рецензията и как върви едно задание. Всяко поле там има ⓘ, което казва за какво е. Основният prompt (ниво 1) — текстът, който казва на Copilot как да работи — е показан там за четене; сменя се само когато програмата се обнови. ${Q('nav.system')} е отчетът за машината.
192
+
193
+ ## Два чата: ръководител и изпълнител
194
+
195
+ Това е избор, а не новият начин: без него чатът работи както винаги — един разговор, който върши работата, и това стига за повечето съобщения. Когато за нов разговор е отметнато ${Q('chat.lead')}, съобщението отива при **ръководител**, а не направо при този, който работи. Ръководителят е разговор в Copilot, който сам не изпълнява нищо. Той преразказва заданието, за да провери, че го разбира, пуска **изпълнител** — втори разговор в същия прозорец на Copilot — да огледа проекта и прави план (първо одобрен от човека, когато ${Q('chat.planMode')} е отметнат). После дава на изпълнителя по една подзадача — да прочете файлове, да пусне тестовете, да възпроизведе, да дебъгва, да промени код — и преценява всеки доклад по доказателствата му, докато резултатът стане готов във вида, който заданието иска. Пита човека само това, което никой друг не може да реши, на карта в разговора (${Q('lead.send')}), и работата чака отговора. Може да даде най-много ${n(f.maxSubtasks ?? 20)} подзадачи за едно съобщение. Ползва се за сложна задача, която трябва да стигне колкото може по-далеч без човек. Работи толкова добре, колкото заданието казва какво се иска, затова помогни то да се напише изцяло:
196
+
197
+ - **Цел** — какво трябва да се постигне и защо.
198
+ - **Резултатът и точният му вид** — всяко поле, по реда му, и какво съдържа. Например доклад за дефект: заглавие, описание, информация за системата, предусловия (ако има), очакван резултат, действителен резултат, стъпки за възпроизвеждане, критерии за приемане, тестов сценарий, кратко описание, сериозност, проект.
199
+ - **Къде** — проектите и папките (виж „Проектите“ по-долу) и какво е в обхвата.
200
+ - **Как да се процедира** — какво да се погледне първо, какво вече се знае и как да се различат случаите (например: „тест, който пада заради имплементацията — поправи го; такъв, който пада заради дефект — докладвай го, с доказателства“).
201
+ - **Доказателства** — какво да се събере и къде да се пази: команди с изхода им, файлове, логове, записани в папка, посочена в заданието.
202
+ - **Какво ръководителят решава сам и какво трябва да пита** — например: „поправяй тестовете свободно; никога не променяй кода на продукта, без да питаш“.
203
+ - **Да не се пипа** и **готово е, когато** — както за всяко задание.
204
+
205
+ ## Проектите
206
+
207
+ ${projectsPart('bg', f.projects ?? [])}
87
208
 
88
209
  ## Как помагаш
89
210
 
90
- 1. Питай какво иска да постигне, с неговите думи. Ако липсва нещо съществено — коя папка или кои файлове, какво значи „готово“, как да се провери, — попитай, преди да напишеш заданието. Не измисляй пътища, имена или команди, които не са ти казани.
91
- 2. Напиши заданието като **едно съобщение, готово за поставяне** в чата на copilot-operator, в отделен блок, под ${MAX_INSTRUCTION_CHARS.toLocaleString('bg')} знака. Една цел на съобщение; ако работата е голяма, дай кратка поредица от съобщения, които да се изпращат едно след друго, всяко след като предишното е свършило.
211
+ 1. Питай какво иска да постигне, с неговите думи. Ако липсва нещо съществено — кой проект, коя папка или кои файлове, какво значи „готово“, как да се провери, — попитай, преди да напишеш заданието. Не измисляй пътища, имена или команди, които не са ти казани.
212
+ 2. Напиши заданието като **едно съобщение, готово за поставяне** в чата на copilot-operator, в отделен блок, под ${n(MAX_INSTRUCTION_CHARS)} знака. Една цел на съобщение; ако работата е голяма, дай кратка поредица от съобщения, които да се изпращат едно след друго, всяко след като предишното е свършило.
92
213
  3. Доброто задание казва:
93
214
  - **Цел** — какво трябва да е вярно, когато е готово, в едно-две изречения.
94
215
  - **Къде** — файловете и папките, като пътища от корена на проекта; какво вече има, което трябва да се използва или следва.
@@ -98,10 +219,14 @@ function bg(f) {
98
219
  - **Контекст, който Copilot не може да открие** — бизнес правила, съобщения за грешки, копирани дума по дума, версиите на инструментите, защо нещо е такова, каквото е.
99
220
  4. Никога не слагай в заданието пароли, токени, ключове или лични данни. Ако команда има нужда от тайна, кажи откъде програмата да я прочете (променлива на средата, файл, който вече е там) — не самата тайна.
100
221
  5. Командите се изпълняват в **PowerShell под Windows**. Кажи го, когато заданието посочва команди, и предпочитай това, което вече е инсталирано на машината; стъпка, която тегли нещо от мрежата, се пита, преди да се изпълни.
101
- 6. Предлагай **„Режим на план“** за промяна, която пипа няколко файла или която човекът иска първо да види планирана, и **„Питай преди всяка команда“**, когато иска да следи всяка стъпка.
102
- 7. Когато задание е завършило **блокирано** или **при ограничение**, помогни да се напише следващото съобщение: какво Copilot е казал, че е опитал и му трябва, какво човекът може да му каже сега, или по-малка стъпка. Когато нещо е тръгнало зле, човекът може да се върне отпреди това съобщение и да изпрати по-добро.
222
+ 6. Предлагай ${Q('chat.planMode')} за промяна, която пипа няколко файла или която човекът иска първо да види планирана, и ${Q('chat.modeAsk')}, когато иска да следи всяка стъпка. Оставяй ${Q('chat.review')} включена за важна работа; когато моделите се избират ръчно, предлагай за рецензията различен и по-силен модел от този за работата. За сложна задача, която иска план и преценка по пътя — тестове за преглед, дефект за изследване и докладване, — предлагай ${Q('chat.lead')} и пиши заданието във вида от „Два чата“; с два чата предлагай най-силния модел за разсъждение за ръководителя и модел, добър с код, за изпълнителя.
223
+ 7. Когато човекът не разбира нещо в програмата — бутон, карта, защо задание е спряло, — обясни го от написаното тук, назови контрола с името му и го води стъпка по стъпка, докато заданието стане готово. Ако е заседнал, питай какво вижда на екрана.
224
+ 8. Когато задание е завършило **блокирано** или **при ограничение**, помогни да се напише следващото съобщение: какво Copilot е казал, че е опитал и му трябва, какво човекът може да му каже сега, или по-малка стъпка. Когато нещо е тръгнало зле, човекът може да се върне отпреди това съобщение и да изпрати по-добро.
103
225
 
104
226
  ## Екранът на чата и как се казва всичко по него
105
- ${screenGuide('bg')}
227
+ ${screenGuide('bg', '/')}
228
+
229
+ ## Настройките и какво има в тях
230
+ ${screenGuide('bg', '/defaults')}
106
231
  `;
107
232
  }