orbitmap 0.4.4 → 0.5.0

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 (86) hide show
  1. package/README.md +73 -10
  2. package/dist/adapters/cloud.d.ts +85 -10
  3. package/dist/adapters/cloud.js +118 -17
  4. package/dist/adapters/cloud.js.map +1 -1
  5. package/dist/adapters/factory.js +7 -0
  6. package/dist/adapters/factory.js.map +1 -1
  7. package/dist/adapters/local/adapter.d.ts +47 -8
  8. package/dist/adapters/local/adapter.js +37 -17
  9. package/dist/adapters/local/adapter.js.map +1 -1
  10. package/dist/adapters/local/context.d.ts +13 -1
  11. package/dist/adapters/local/context.js +7 -2
  12. package/dist/adapters/local/context.js.map +1 -1
  13. package/dist/adapters/local/entities/documents.d.ts +18 -4
  14. package/dist/adapters/local/entities/documents.js +46 -7
  15. package/dist/adapters/local/entities/documents.js.map +1 -1
  16. package/dist/adapters/local/entities/planning.d.ts +36 -7
  17. package/dist/adapters/local/entities/planning.js +245 -39
  18. package/dist/adapters/local/entities/planning.js.map +1 -1
  19. package/dist/adapters/local/entities/tasks.d.ts +16 -7
  20. package/dist/adapters/local/entities/tasks.js +55 -42
  21. package/dist/adapters/local/entities/tasks.js.map +1 -1
  22. package/dist/adapters/local/entities/work-items.d.ts +28 -7
  23. package/dist/adapters/local/entities/work-items.js +111 -39
  24. package/dist/adapters/local/entities/work-items.js.map +1 -1
  25. package/dist/adapters/local/lists.d.ts +139 -0
  26. package/dist/adapters/local/lists.js +230 -0
  27. package/dist/adapters/local/lists.js.map +1 -0
  28. package/dist/adapters/local/rules.js +22 -0
  29. package/dist/adapters/local/rules.js.map +1 -1
  30. package/dist/adapters/local/shapes.d.ts +165 -22
  31. package/dist/adapters/local/shapes.js +338 -50
  32. package/dist/adapters/local/shapes.js.map +1 -1
  33. package/dist/adapters/local/types.d.ts +5 -0
  34. package/dist/adapters/local/types.js.map +1 -1
  35. package/dist/adapters/types.d.ts +72 -9
  36. package/dist/agent-instructions.d.ts +39 -10
  37. package/dist/agent-instructions.js +268 -68
  38. package/dist/agent-instructions.js.map +1 -1
  39. package/dist/commands/context.d.ts +62 -37
  40. package/dist/commands/context.js +105 -36
  41. package/dist/commands/context.js.map +1 -1
  42. package/dist/commands/docs.d.ts +4 -0
  43. package/dist/commands/docs.js +12 -5
  44. package/dist/commands/docs.js.map +1 -1
  45. package/dist/commands/ideas.d.ts +3 -0
  46. package/dist/commands/ideas.js +14 -7
  47. package/dist/commands/ideas.js.map +1 -1
  48. package/dist/commands/intent.d.ts +26 -0
  49. package/dist/commands/intent.js +110 -7
  50. package/dist/commands/intent.js.map +1 -1
  51. package/dist/commands/issues.d.ts +4 -0
  52. package/dist/commands/issues.js +15 -7
  53. package/dist/commands/issues.js.map +1 -1
  54. package/dist/commands/mission.d.ts +2 -0
  55. package/dist/commands/mission.js +9 -5
  56. package/dist/commands/mission.js.map +1 -1
  57. package/dist/commands/setup-agent.d.ts +34 -0
  58. package/dist/commands/setup-agent.js +95 -4
  59. package/dist/commands/setup-agent.js.map +1 -1
  60. package/dist/commands/start.d.ts +13 -0
  61. package/dist/commands/start.js +125 -13
  62. package/dist/commands/start.js.map +1 -1
  63. package/dist/commands/tasks.d.ts +23 -5
  64. package/dist/commands/tasks.js +46 -23
  65. package/dist/commands/tasks.js.map +1 -1
  66. package/dist/commands/vibes.d.ts +3 -0
  67. package/dist/commands/vibes.js +11 -5
  68. package/dist/commands/vibes.js.map +1 -1
  69. package/dist/errors.d.ts +23 -2
  70. package/dist/errors.js +31 -3
  71. package/dist/errors.js.map +1 -1
  72. package/dist/index.js +108 -36
  73. package/dist/index.js.map +1 -1
  74. package/dist/list-meta.d.ts +117 -0
  75. package/dist/list-meta.js +160 -0
  76. package/dist/list-meta.js.map +1 -0
  77. package/dist/list-options.d.ts +33 -0
  78. package/dist/list-options.js +70 -0
  79. package/dist/list-options.js.map +1 -0
  80. package/dist/workspace-resolve.d.ts +47 -1
  81. package/dist/workspace-resolve.js +74 -11
  82. package/dist/workspace-resolve.js.map +1 -1
  83. package/dist/write-target.d.ts +9 -0
  84. package/dist/write-target.js +11 -2
  85. package/dist/write-target.js.map +1 -1
  86. package/package.json +2 -2
@@ -45,10 +45,98 @@
45
45
  // CLI translation of the MCP oracle (`orbitmap-mcp/.../instructions.py`). The skills
46
46
  // have since evolved past that spec — worklog wiring, the keep/drop test, and the v2
47
47
  // whole-intent execute flow — so THIS FILE is now normative, not the spec.
48
- export const MARKER_START = '<!-- ORBITMAP_START -->';
48
+ import { createRequire } from 'node:module';
49
+ /**
50
+ * The version of this CLI, read from package.json exactly the way `--version` does in
51
+ * `src/index.ts`: `../package.json` resolves to the repo root from both `src/` and
52
+ * `dist/`, and npm always ships package.json in the tarball.
53
+ */
54
+ export const CLI_VERSION = createRequire(import.meta.url)('../package.json').version;
55
+ /**
56
+ * Stable prefix of the start marker, shared by every generation of installed block.
57
+ *
58
+ * In-place rewrite logic MUST match on this prefix (never on the full
59
+ * {@link MARKER_START}): pre-versioning installs wrote `<!-- ORBITMAP_START -->` with no
60
+ * version stamp, and a refresh has to find and upgrade those too (IS-bej5d8).
61
+ */
62
+ export const MARKER_START_PREFIX = '<!-- ORBITMAP_START';
63
+ /**
64
+ * The start marker as written by THIS binary. Carries the CLI version so drift between
65
+ * an installed block and the shipped instructions is detectable (IS-bej5d8).
66
+ */
67
+ export const MARKER_START = `${MARKER_START_PREFIX} v${CLI_VERSION} -->`;
68
+ /** Unversioned deliberately — the version lives only in the START marker. */
49
69
  export const MARKER_END = '<!-- ORBITMAP_END -->';
70
+ /**
71
+ * Read the version stamp out of an installed instruction block.
72
+ *
73
+ * Returns the version string (`"0.4.6"`) when the start marker carries one, `null` for a
74
+ * pre-versioning `<!-- ORBITMAP_START -->` marker, and `undefined` when `content` holds
75
+ * no OrbitMap block at all.
76
+ */
77
+ export function parseInstalledMarkerVersion(content) {
78
+ const match = content.match(/<!-- ORBITMAP_START(?:\s+v(\S+?))?\s*-->/);
79
+ if (!match)
80
+ return undefined;
81
+ return match[1] ?? null;
82
+ }
50
83
  /** The core skill name (entry point). Kept for backwards compatibility. */
51
84
  export const SKILL_NAME = 'orbitmap';
85
+ // ── Shared section: SESSION FOCUS ──────────────────────────────────────────────
86
+ //
87
+ // LOCKED COPY from IN-vnz6fs's design ("Skill bodies" block), plus the amendment-2
88
+ // semantics (soft cap, transient references, file-as-optimization). Consumed verbatim —
89
+ // do not paraphrase it away. The full section ships ONCE, inside the core `orbitmap`
90
+ // skill body; every other gate body carries a compact ensure rule that points here.
91
+ //
92
+ // Decision #11 (IN-nahetc) compatibility: session focus is CLIENT-SIDE state only —
93
+ // nothing on the wire narrows a list to an intent on the agent's behalf. Every task
94
+ // query the skills emit still carries `--intent` explicitly; the locked copy below
95
+ // restates that rule ("Never narrow silently").
96
+ export const SESSION_FOCUS_SECTION = `## Session focus
97
+
98
+ SESSION FOCUS — Ensure, don't call. A session focus file ({mission, intents (≤3 typical —
99
+ a SOFT cap: focus holds what the session is actively advancing), areas, agent_id,
100
+ matched_at}) lives in your session temp directory. If present and the agent identity
101
+ matches: do NOT call context. If missing or invalid — an identity or area mismatch
102
+ invalidates it — call \`orbitmap context\` once, match the conversation against its
103
+ handles, write the file, and STATE the match in one line — the intent's NAME, its number
104
+ only at first mention. Never narrow silently: every task query you send still carries
105
+ \`--intent\` explicitly. An intent you just created or fetched joins the focus by its
106
+ handle — no context call. If a write fails INTENT_CLOSED: your focus is stale — re-derive
107
+ and say so. Before creating a new intent or declaring none exists: fetch the 1–3 nearest
108
+ candidates with \`intent show --no-logs\` and judge from their bodies, not TL;DRs — a rule
109
+ for creation/dedup decision points only. If nothing matches: offer to frame an intent
110
+ (brainstorm gate) — never create a bare shell; if declined, work from the fetched missions
111
+ and intents ("look wider").
112
+
113
+ TRANSIENT references never enter focus: an intent fetched for a dedup check or a
114
+ cross-comparison is read and used, not focused; a real focus switch is stated aloud
115
+ ("focus now X, parking Y"). The file is an optimization with graceful failure — the
116
+ conversation is the primary carrier, the file only compaction insurance: no file → the
117
+ ensure rule above triggers one context call. Agent memory directories are the WRONG store
118
+ for focus (a cross-session lifetime means stale focus).`;
119
+ // ── Shared section: FRESHNESS (API 10.1.0, IN-qqqna5) ──────────────────────────
120
+ //
121
+ // The two UNIVERSAL rules plus the intent freshness-probe flow. Ships ONCE, inside the
122
+ // core `orbitmap` skill body (same pattern as SESSION_FOCUS_SECTION); other gate bodies
123
+ // carry a compact rule that points here.
124
+ export const FRESHNESS_SECTION = `## Freshness
125
+
126
+ Two universal rules — they apply to EVERY OrbitMap object, in every flow:
127
+ - TRUST THE WRITE'S ECHO. A successful write already returns the updated object — the
128
+ echo IS the current state. Never re-fetch an object just to verify a write you made.
129
+ - COMPARE THE HELD MARKER BEFORE RE-FETCHING ANYTHING BIG. Every full fetch hands you a
130
+ change marker — the \`updated_at\` + \`last_log_id\` pair on intents (tasks and missions
131
+ carry the pair too), \`version\` on documents. Hold it; re-fetch only on a mismatch.
132
+
133
+ PROBE FLOW (intents): the session focus file remembers each focused intent's
134
+ \`updated_at\` + \`last_log_id\` pair from the last FULL fetch. To check whether an
135
+ intent moved, run \`orbitmap intent show IN-x --slim\` — a ~150-token probe (handle,
136
+ TL;DRs, areas, mission, task counts, the pair). Pair unchanged → the intent has not
137
+ moved: SAY SO in one line and keep working from what you hold — no full fetch. Pair
138
+ changed → re-fetch (\`intent show IN-x\`, with \`--no-logs\` when the log tail is not
139
+ needed) and remember the new pair in the focus file.`;
52
140
  // ── Skill: orbitmap (core) — §8.3 ──────────────────────────────────────────────
53
141
  export const SKILL_ORBITMAP_FRONTMATTER = `---
54
142
  name: orbitmap
@@ -65,9 +153,9 @@ identically in cloud mode and local-files mode — never assume which one is act
65
153
  never read or write the workspace's data files directly. The CLI is the only interface.
66
154
 
67
155
  ## Goal
68
- Operate OrbitMap correctly: always start from \`orbitmap context\`, act on the active mission
69
- and open intents, write every item to the area the work belongs to, and go through the CLI
70
- only — never the data files.
156
+ Operate OrbitMap correctly: ensure session focus (below) instead of ritually calling
157
+ context, act on the mission and intents the session is about, write every item to the area
158
+ the work belongs to, and go through the CLI only — never the data files.
71
159
 
72
160
  **Interface:** every action below is an OrbitMap operation — run the \`orbitmap\` CLI command
73
161
  shown, or its equivalent MCP tool when this session uses MCP; \`orbitmap <cmd> --help\` and the
@@ -89,10 +177,17 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
89
177
  outside a task. Task (TS-) = unit of work.
90
178
  - Entity numbers (TS-xxxxxx etc.) are accepted by every command that takes an id.
91
179
 
180
+ ${SESSION_FOCUS_SECTION}
181
+
182
+ ${FRESHNESS_SECTION}
183
+
92
184
  ## Context
93
- - START HERE, always: \`orbitmap context\`. \`orbitmap context\` is authoritative and returns
94
- in ONE call everything a session needs the agent, the workspace, the areas you work in,
95
- the active mission, open intents, your tasks and the documents. Never list areas and never
185
+ - Ensure session focus (above) at most ONE \`orbitmap context\` call per session, and none
186
+ while a valid focus file is held. \`orbitmap context\` is authoritative MATCHING MATERIAL:
187
+ your agent identity, the missions and intents as handles with TL;DR summaries, standalone
188
+ mission workitems, the areas you work in, and document metadata. It carries no task
189
+ lists and no bodies — fetch deeper on demand (\`orbitmap intent show IN-x\`,
190
+ \`orbitmap tasks --intent IN-x\`, \`orbitmap doc <slug>\`). Never list areas and never
96
191
  ask the user "which area?" before you have read it.
97
192
  - You work in a WORKSPACE, not inside a single area. Missions, intents
98
193
  and documents are workspace-level and take no area — a document is exactly ONE copy,
@@ -120,15 +215,38 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
120
215
  \`source\` of \`global ~/.orbitmap/config.json\` is a machine-wide leftover that nothing
121
216
  here chose — treat it as unconfirmed and pass \`--area\` explicitly.
122
217
 
218
+ ## Task or intent?
219
+
220
+ An intent earns its gates when the work carries knowledge someone would otherwise
221
+ re-derive or re-litigate: a decision with a rejected alternative, a design that outlives
222
+ the change, a constraint worth recording. Work with none of that — a typo, a copy tweak,
223
+ an obvious one-file fix — is a task: create it, do it, log it, done. The same test the
224
+ work log uses for what to write down. If a "small" fix turns out to hide a real decision,
225
+ stop and frame it; discovering that mid-change is normal, not a failure.
226
+
123
227
  ## Task statuses
124
228
  backlog, todo, in_progress, in_review, review_changes, done, blocked.
125
229
  \`orbitmap tasks\` defaults to todo,in_progress. Ask for others explicitly, e.g.
126
230
  \`orbitmap tasks --status backlog\` when the user asks about the backlog.
127
231
 
232
+ ## Listing tasks
233
+ - A list spans EVERY area you can reach and EVERY assignee — nothing narrows it to the
234
+ current directory or to you. It is capped at 30 rows with the totals behind the cap
235
+ printed, and every list states the filters that produced it. Read that line before you
236
+ answer from a list.
237
+ - While you are executing an intent, EVERY task query carries \`--intent IN-x\`. Nothing
238
+ narrows a list to an intent on your behalf: a bare \`orbitmap tasks\` is you having
239
+ deliberately left the intent to look at the whole workspace.
240
+ - \`orbitmap intent show IN-x\` already carries the intent's own tasks, so intent lifecycle
241
+ work needs no filter at all. \`orbitmap tasks --intent IN-x\` is the escape hatch for the
242
+ times you want the task-list shape — statuses, assignees, the filter line — instead.
243
+
128
244
  ## Command reference (all commands accept --json)
129
- - Context: \`orbitmap context\` (start here), \`orbitmap overview\`, \`orbitmap areas\`
245
+ - Context: \`orbitmap context\` (once per session at most — see Session focus),
246
+ \`orbitmap overview\`, \`orbitmap areas\`
130
247
  (rarely needed — context already lists the areas you work in)
131
- - Tasks: \`orbitmap tasks [--status s1,s2]\`, \`orbitmap task TS-x\`, \`orbitmap get <ID>\`,
248
+ - Tasks: \`orbitmap tasks [--status s1,s2] [--intent IN-x]\`, \`orbitmap task TS-x\`,
249
+ \`orbitmap get <ID>\`,
132
250
  \`orbitmap start [TS-x]\`, \`orbitmap status TS-x <status> [--delivery <d>]\`,
133
251
  \`orbitmap create "title" [--intent IN-x|--mission MS-x] [--priority p]\`,
134
252
  \`orbitmap subtask TS-parent "title"\`, \`orbitmap assign TS-x [agent]\`,
@@ -138,6 +256,8 @@ backlog, todo, in_progress, in_review, review_changes, done, blocked.
138
256
  - Vibes: \`orbitmap vibe log|list|show\`
139
257
  - Missions: \`orbitmap mission list|show|create|update|status|link|unlink\`
140
258
  - Intents: \`orbitmap intent list|show|create|update|link|unlink\`
259
+ (\`show\` embeds the context bundle — \`--no-bundle\` strips it, \`--slim\` is the
260
+ freshness probe, \`--no-logs\` skips the log tail)
141
261
  - Documents: \`orbitmap docs\`, \`orbitmap doc <slug> [--section "## H"|--full]\`,
142
262
  \`orbitmap doc-import\`, \`orbitmap doc-update\`
143
263
 
@@ -194,16 +314,29 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
194
314
  - **Distrust and verify.** Instructions age; the tree is the truth. Re-grep any claim a
195
315
  task's instructions make about the code ("X lives in Y", "verified list of call sites")
196
316
  before relying on it.
197
- - **The orchestrator owns shared state.** Workers never run git, never write OrbitMap,
198
- never use the shared test DB, never format, never change dependencies commits, logs,
199
- statuses, formatting and test gates all happen at fold time, in the orchestrator.
317
+ - **Every task query names the intent.** While executing IN-x, EVERY task query carries
318
+ \`--intent IN-x\`. A list otherwise spans every area you can reach and every assignee,
319
+ capped at 30 rows with the totals printed and the filters that produced it stated on
320
+ the list — so a bare \`orbitmap tasks\` is you deliberately stepping OUTSIDE the intent,
321
+ never a shortcut to it. \`orbitmap intent show IN-x\` already carries the intent's own
322
+ tasks, so the intent lifecycle steps below need no filter at all; \`--intent\` is the
323
+ escape hatch for the times you want the task-list shape instead.
324
+ - **The orchestrator owns shared state.** Workers never run git, never use the shared
325
+ test DB, never format, never change dependencies, and never write OrbitMap beyond
326
+ appending to their OWN task's work log — commits, statuses, formatting and test gates
327
+ all happen at fold time, in the orchestrator.
328
+ - **Freshness** (see Freshness in the \`orbitmap\` skill): trust each write's echo — never
329
+ re-fetch to verify your own write; before any big re-fetch compare the held
330
+ \`updated_at\`/\`last_log_id\` pair, probing with \`orbitmap intent show IN-x --slim\`.
200
331
  - **Never end the run to wait.** Shared gates QUEUE safely: run them in the foreground
201
332
  and wait on the command (generous timeout); an overrun that gets backgrounded resumes
202
333
  you on completion. Ending your turn is only for: run COMPLETE, or hard-blocked and
203
334
  logged — a background run that yields to "wait for a signal" is a dead run.
204
335
 
205
336
  ## Flow A — execute IN-x (whole intent)
206
- 1. **Premise check.** \`orbitmap intent show IN-x\`: it must exist, be at status \`build\`,
337
+ 1. **Premise check.** IN-x joins your session focus by its handle — no context call
338
+ (see Session focus in the \`orbitmap\` skill). \`orbitmap intent show IN-x\`: it must
339
+ exist, be at status \`build\`,
207
340
  and have tasks with agent_instructions. Anything missing → refuse politely and point at
208
341
  the missing gate (\`orbitmap-brainstorm\` for no outcome, \`orbitmap-design\` for no
209
342
  design, \`orbitmap-plan\` for no tasks). Read the outcome, design, plan field and work
@@ -229,18 +362,22 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
229
362
  - Size the wave by GATE CONTENTION, not a constant: tasks needing the shared test DB
230
363
  ≤4 concurrent (the gate serialises anyway); light, file-disjoint tasks (docs,
231
364
  separate repos) as wide as the ready-set — 10+ is fine.
232
- - Dispatch one worker (subagent) per task. Prompt = the task number, its
233
- agent_instructions PASTED VERBATIM (workers get no CLI credentials never make one
234
- fetch its own spec), the repo path, the exact files it owns, and one line: "Follow
365
+ - Dispatch one worker (subagent) per task, writing \`orbitmap status TS-x in_progress\`
366
+ at dispatch. Pass ORBITMAP_API_KEY + ORBITMAP_API_URL into the worker's env the
367
+ worker logs its OWN task as it builds, per the contract. Prompt = the task number,
368
+ its agent_instructions PASTED VERBATIM (never make a worker fetch its own spec),
369
+ the repo path, the exact files it owns, and one line: "Follow
235
370
  references/worker-contract.md of the orbitmap-execute skill." Worktree isolation
236
371
  ONLY when same-repo tasks in the wave overlap on files; otherwise slice the wave
237
372
  file-disjoint in one tree; cross-repo needs nothing.
238
373
  - FOLD the workers' results sequentially in dependency order, a gate between folds:
239
374
  integrate one task → scoped tests → formatter → commit \`[TS-x] …\` (one commit may
240
- carry several tasks that verify as one unit) → log per the keep/drop test →
375
+ carry several tasks that verify as one unit) → log ONLY what the fold itself
376
+ learns (keep/drop test) — the worker wrote its own narrative; do not re-write it →
241
377
  \`orbitmap status TS-x in_review --delivery on_branch\`.
242
378
  - A task neither the worker nor the fold can save → \`orbitmap log TS-x "Blocked: …"
243
- --type blocker\` + \`orbitmap status TS-x blocked\` the run CONTINUES without it.
379
+ --type blocker\` + \`orbitmap status TS-x blocked\` THE MOMENT the worker reports it,
380
+ not at fold — the run CONTINUES without it.
244
381
  Its dependents leave the ready-set with their own logged blocker but KEEP their
245
382
  status (backlog): they are waiting, not failed.
246
383
  - Recompute the ready-set; next wave.
@@ -307,10 +444,13 @@ digraph orbitmap_execute {
307
444
  \`\`\`
308
445
 
309
446
  ## Flow B — work on TS-x (single task)
310
- 1. \`orbitmap context\` workspace, areas, active mission, open intents and your tasks in
311
- one call. Never ask which area; never list areas first.
312
- 2. Unfinished work in context (or \`orbitmap tasks --status in_progress\`)
313
- \`orbitmap task TS-x\` read the work log resume from the resume point.
447
+ 1. Ensure session focus (see Session focus in the \`orbitmap\` skill): a valid focus file
448
+ means NO context call; missing or invalid one \`orbitmap context\` call, match the
449
+ conversation against its handles, and state the match in one line. A directly named
450
+ TS-x needs no matching at all fetch it. Never ask which area; never list areas first.
451
+ 2. Unfinished work (\`orbitmap tasks --status in_progress\`, with \`--intent IN-x\` while
452
+ focused on an intent) → \`orbitmap task TS-x\` → read the work log → resume from the
453
+ resume point.
314
454
  3. Otherwise pick work serving the active mission / open intents, or \`orbitmap start\` —
315
455
  auto-picks the first todo task, sets it in_progress and prints full context.
316
456
  \`orbitmap start TS-x\` begins a specific task; \`orbitmap task TS-x\` only inspects.
@@ -322,6 +462,13 @@ digraph orbitmap_execute {
322
462
 
323
463
  ## Logging (both flows)
324
464
  - \`orbitmap log TS-x "…" --type note|code_change|decision|blocker\` — work WITHIN a task.
465
+ - CADENCE IS A TEST, not a schedule: log when knowledge arises that git cannot
466
+ reconstruct — a spec claim that failed verification, a decision with a rejected
467
+ alternative, a blocker the moment it blocks, a discovery or risk outside the task's
468
+ boundary, what a failing gate revealed. NOT file lists, test counts or progress
469
+ narration. 1–3 entries on a normal task — losing nothing is the goal, volume is not.
470
+ A long task whose whole log lands at the end is refused (WORK_LOG_RECONSTRUCTED) —
471
+ log during, not after.
325
472
  - \`orbitmap vibe log "…" --type discovery|exploration|fix\` — ad-hoc work outside a task.
326
473
  - \`orbitmap idea add\` — future possibilities, NOT problems (problems →
327
474
  \`orbitmap issue register\`).
@@ -358,7 +505,8 @@ digraph orbitmap_execute {
358
505
  --type blocker\` then \`orbitmap status TS-x blocked\`.
359
506
  - Session ending, task unfinished but NOT blocked → \`orbitmap log TS-x "Resume point: …"
360
507
  --type note\` — leave status in_progress.
361
- - NEVER leave a task without a final log entry.
508
+ - NEVER leave a task without a final log entry — the final entry closes a record that
509
+ already exists; it is never the record.
362
510
  - Closing the intent (ONLY when the user explicitly asks — Flow A never does) → the
363
511
  transition must carry the build phase's entries (\`--log <type>:<content>\` is
364
512
  repeatable): \`orbitmap intent update IN-x --status done --log code_change:"<what was
@@ -391,16 +539,18 @@ digraph orbitmap_execute {
391
539
  green gates, never a retry budget.
392
540
  - Decide-and-log within the design; \`blocked\` + continue for a stuck task; interrupt the
393
541
  user only for intent-level risk. Never a silent skip.
394
- - Workers follow \`references/worker-contract.md\`: no git, no OrbitMap writes, no shared
395
- test DB, no formatter, no dependency changes the orchestrator owns all of those.
542
+ - Workers follow \`references/worker-contract.md\`: no git, no shared test DB, no
543
+ formatter, no dependency changes, no OrbitMap writes beyond their own task's log
544
+ the orchestrator owns all of those.
396
545
  - Flow B works on ONE task at a time.
397
546
  - Always read agent_instructions before implementing, then re-verify their claims against
398
547
  the tree (distrust-and-verify).
399
548
  - Agents with a plan mode: an implementation plan for a tracked task MUST include the
400
549
  lifecycle as explicit steps — first the task number/title, last the final \`orbitmap log\`
401
550
  + \`orbitmap status\` per the status decision guide.
402
- - NEVER leave a task without a final log entry; never author \`status_change\`; an intent
403
- transition without \`--log\` entries is refused (422).`;
551
+ - NEVER leave a task without a final log entry it closes a record that already exists,
552
+ never IS the record; never author \`status_change\`; an intent transition without
553
+ \`--log\` entries is refused (422).`;
404
554
  // Reference files shipped WITH the orbitmap-execute skill (the worker contract that
405
555
  // dispatched subagents read instead of the whole skill). See SkillDef.references for
406
556
  // the shape the installer consumes.
@@ -423,8 +573,13 @@ state, formatting, the test gates. Your job is the code and an honest report.
423
573
  - Own ONLY the files named in your dispatch prompt. A change needed elsewhere is a
424
574
  finding to report, never an edit to make.
425
575
  - NEVER run git — no commit, branch, stash, checkout. The orchestrator commits.
426
- - NEVER write OrbitMap stateno \`orbitmap log\` / \`status\` / \`create\` / \`update\`.
427
- Reading (\`orbitmap task\`, \`orbitmap doc\`) is fine.
576
+ - OrbitMap writesone carve-out. You MAY append work-log entries to YOUR ONE
577
+ dispatched task (\`orbitmap log TS-x "…" --type note|code_change|decision|blocker\`),
578
+ as knowledge arises, never batched at the end. This is safe because append-only
579
+ writes to a single task cannot collide between parallel workers. Everything else is
580
+ still NEVER — \`orbitmap status\` / \`create\` / \`update\`, and any write to any OTHER
581
+ task: those operations share state the orchestrator owns. Reading (\`orbitmap task\`,
582
+ \`orbitmap doc\`) is fine.
428
583
  - NEVER use the shared test DB or its Docker gate — parallel workers would collide on it.
429
584
  The orchestrator runs those tests at fold time.
430
585
  - NEVER run the repo formatter (it rewrites files you do not own) and NEVER change
@@ -437,6 +592,13 @@ state, formatting, the test gates. Your job is the code and an honest report.
437
592
  - Syntax-check everything you touch with cheap, isolated checks (\`php -l\`, \`tsc --noEmit\`,
438
593
  \`python -m py_compile\`, a scoped non-shared test run) — never the shared gates.
439
594
 
595
+ ## Log as you build — the cadence is a test
596
+ Write a work-log entry when knowledge arises that git cannot reconstruct: a spec claim
597
+ that failed verification, a decision with a rejected alternative, a blocker the moment
598
+ it blocks, a discovery or risk outside your boundary, what a failing check revealed.
599
+ NOT file lists, test counts, or progress narration. 1–3 entries on a normal task —
600
+ losing nothing is the goal, volume is not.
601
+
440
602
  ## Report — your final text goes to the orchestrator, not to a user
441
603
  Structure it as:
442
604
  - **Files changed** — every file, one line each on what changed and why.
@@ -546,14 +708,21 @@ task/issue that has an intent; the CLI enforces this.
546
708
  edge — wire it even though the tasks live in different areas.
547
709
 
548
710
  ## Flow
549
- 1. Gather context. Read the intent's \`outcome\` + \`design\` + \`plan\` field
711
+ 1. Gather context. Ensure session focus (see Session focus in the \`orbitmap\` skill) —
712
+ the intent you are planning joins the focus by its handle, no context call while the
713
+ focus file is valid. Read the intent's \`outcome\` + \`design\` + \`plan\` field
550
714
  (\`orbitmap intent show IN-x\`) — if the plan field holds seed notes, absorb them as
551
- highest-priority input (see above); \`orbitmap context\`; the relevant doc BODIES (\`orbitmap doc <slug>\` — the design flagged
715
+ highest-priority input (see above); the relevant doc BODIES (\`orbitmap doc <slug>\` — the design flagged
552
716
  which); the neighbourhood (mission, sibling intents, and the intent's EXISTING tasks —
553
717
  do not re-decompose them). Verify against the repo before decomposing.
554
718
  2. Decompose the design into a FLAT list of concrete tasks, each placed in the CORRECT
555
719
  area — \`orbitmap create "title" --intent IN-x --area <slug> [--priority p]\`. No
556
720
  subtasks.
721
+ - DECLARE THE INTENT'S AREAS as part of decomposition: your task placement decisions
722
+ ARE the intent's area list — write it with
723
+ \`orbitmap intent update IN-x --areas <slug>,<slug>\` (the distinct areas of the
724
+ tasks you are creating). Declared areas feed session-focus matching for every later
725
+ session.
557
726
  - KEEP/DROP TEST — log a \`decision\` when ANY of these is true: an alternative was
558
727
  considered and REJECTED (record which, and why it lost); a non-obvious assumption or
559
728
  constraint was LOCKED IN; a choice was made that a later reader would otherwise
@@ -664,7 +833,8 @@ digraph orbitmap_plan {
664
833
  - **Self-contained?** Every task's instructions carry summary + Orb context + doc pointers
665
834
  + acceptance + any depends-on line — runnable by a zero-context agent.
666
835
  - **No placeholders?** Self-review done; no vague/TBD instructions remain.
667
- - **Areas?** Each task in the right area.
836
+ - **Areas?** Each task in the right area, and the intent's areas declared
837
+ (\`intent update --areas\`) to match the placements.
668
838
  - **Dependencies?** Orb dep edges wired AND named in the dependent tasks' instructions.
669
839
  - **Plan field?** Cross-task notes + a summary written to the intent \`plan\` field.
670
840
  - **Doc-update?** A doc-update-after-green task is in the plan.
@@ -702,6 +872,8 @@ triaging issues):
702
872
  Orb context + doc pointers + acceptance + any depends-on line). No placeholders.
703
873
  - Wire dependencies as Orb edges AND name them in the dependent tasks' instructions.
704
874
  - Place each task in the correct area; derive it from the work, not the current directory.
875
+ - Declare the intent's areas during decomposition (\`orbitmap intent update IN-x --areas\`) —
876
+ task placement decisions are the area list.
705
877
  - Self-review the plan before presenting; fix placeholders/coverage/consistency inline.
706
878
  - Write cross-task notes + a summary to the intent \`plan\` field.
707
879
  - Log \`decision\` entries that pass the keep/drop test (Flow step 2) as they are agreed, never
@@ -753,9 +925,11 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
753
925
  do not interrogate. The ONE thing you must reach is an AGREED OUTCOME; everything else
754
926
  useful gets captured for later, never blocked on.
755
927
  - **Gate before build.** No feature, component, or behavior change starts before the
756
- outcome is agreed and written to OrbitMap. "Too simple to frame" is exactly where
757
- unexamined assumptions cost the most — every idea gets an outcome, even a one-sentence
758
- one.
928
+ outcome is agreed and written to OrbitMap. For anything that changes behaviour, "too
929
+ simple to frame" is exactly where unexamined assumptions cost the most — a one-sentence
930
+ outcome is still an outcome. Genuinely small self-contained work (a typo, a copy tweak,
931
+ an obvious one-file fix) is a task, not an intent; see the \`orbitmap\` skill's
932
+ task-or-intent test.
759
933
  - **The outcome is an agreement, not your guess.** It is the user's, in the user's words.
760
934
  Never advance on an assumed or half-agreed outcome.
761
935
  - **One question at a time.** Refine by dialogue, never a questionnaire dump.
@@ -793,9 +967,11 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
793
967
 
794
968
  ## Flow
795
969
  1. Gather context.
796
- - \`orbitmap context\` and \`orbitmap intent show IN-x\` already carry the workspace,
797
- mission, recently-used and open intents, and the target intent; read any referenced
798
- idea (ID-) too.
970
+ - Ensure session focus (see Session focus in the \`orbitmap\` skill): a valid focus
971
+ file means NO context call; missing or invalid one \`orbitmap context\` call
972
+ supplies the matching material. The focus plus \`orbitmap intent show IN-x\` already
973
+ carry the workspace, mission, the nearby recently-used and open intents, and the
974
+ target intent; read any referenced idea (ID-) too.
799
975
  - Check the repo itself — relevant files, docs, recent commits — when the outcome
800
976
  touches existing code and to get all the context.
801
977
  - Skim the available knowledge — the doc lists (\`available_docs\` across areas,
@@ -806,7 +982,9 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
806
982
  intent serve a still-active mission?) and the SIBLING intents under that mission/orbit
807
983
  with their outcomes + statuses — from the intent context if present, else
808
984
  \`orbitmap mission show MS-x\` / \`orbitmap intents\`. Reconcile or link rather than frame
809
- a duplicate/conflicting outcome; ignore siblings that are \`done\`/\`cancelled\`.
985
+ a duplicate/conflicting outcome and never declare "no duplicate" from TL;DRs alone:
986
+ fetch the 1–3 nearest candidates' bodies (\`orbitmap intent show IN-x --no-logs\`)
987
+ first. Ignore siblings that are \`done\`/\`cancelled\`.
810
988
  - Verify the premise before framing: is this already built or partially shipped, is any
811
989
  prerequisite phase actually complete, do the named entities exist? Grep migrations /
812
990
  commits / the tracker — frame on what is true NOW, not on the plan doc's claim.
@@ -847,6 +1025,10 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
847
1025
  as the user's in both fields; you may add your own, kept separate. The design gate reads
848
1026
  the design notes and the plan gate reads the plan notes, each as its highest-priority
849
1027
  input.
1028
+ - A freshly created intent joins your session focus by its handle — no context call.
1029
+ - OPTIONALLY declare the intent's areas when the conversation already made the touched
1030
+ repos obvious — \`orbitmap intent update IN-x --areas <slug>,<slug>\`; otherwise leave
1031
+ the declaration to the design and plan gates, which own it.
850
1032
  - If you promoted an OrbitMap idea, mark it used: \`orbitmap idea status ID-x used\`.
851
1033
  5. Advance the lifecycle, carrying this gate's entries — \`--log <type>:<content>\` is
852
1034
  REPEATABLE and \`new → design\` is decision-heavy (why this outcome, what is out of scope):
@@ -921,7 +1103,8 @@ Then write it (Flow step 4), advance \`new → design\`, and hand the baton to
921
1103
  export const SKILL_DESIGN_FRONTMATTER = `---
922
1104
  name: orbitmap-design
923
1105
  description: >
924
- Designing an intent's solution in OrbitMap: turns an agreed outcome into an approach,
1106
+ Designing an intent's solution in OrbitMap the second gate of the product-building
1107
+ flow (after brainstorm): turns an agreed outcome into an approach,
925
1108
  technical spec, and UX (when there's UI), one question at a time, then writes the
926
1109
  result to the intent's design field. Use for "design this intent", "let's design X", or
927
1110
  an intent entering \`design\` status. Use it once the outcome is agreed; if the outcome is
@@ -1001,9 +1184,10 @@ well-bounded units are easier to build, review, and reason about.
1001
1184
 
1002
1185
  ## Flow
1003
1186
  1. Gather context.
1004
- - \`orbitmap intent show IN-x\` the outcome and the design field; \`orbitmap context\`
1005
- for the workspace and mission. If the design field holds framing notes, absorb them
1006
- as highest-priority input (see above).
1187
+ - Ensure session focus (see Session focus in the \`orbitmap\` skill) the intent you
1188
+ are designing joins the focus by its handle; no context call while the focus file is
1189
+ valid. \`orbitmap intent show IN-x\` the outcome and the design field. If the design
1190
+ field holds framing notes, absorb them as highest-priority input (see above).
1007
1191
  - Check the repo — relevant files, existing patterns, docs, recent commits. You design
1008
1192
  against real code, so read it before proposing.
1009
1193
  - Pull the relevant OrbitMap docs: from the doc lists (\`available_docs\` /
@@ -1066,7 +1250,9 @@ well-bounded units are easier to build, review, and reason about.
1066
1250
  more when nuanced); after each section ask whether it looks right, and get the user's
1067
1251
  approval before writing anything.
1068
1252
  6. Write it: \`orbitmap intent update IN-x --design "<doc>"\`. This REPLACES any framing
1069
- notes that were in the field — you have already absorbed them into the doc.
1253
+ notes that were in the field — you have already absorbed them into the doc. When the
1254
+ spec names the repos the build will touch, declare them on the intent in the same
1255
+ update — \`--areas <slug>,<slug>\` — so session-focus matching works from declared data.
1070
1256
  7. Advance the lifecycle, carrying this gate's entries — \`--log <type>:<content>\` is
1071
1257
  REPEATABLE and \`design → plan\` is decision-heavy (technical choices, rejected
1072
1258
  alternatives):
@@ -1166,7 +1352,9 @@ description: >
1166
1352
  export const SKILL_DOCS_BODY = `# OrbitMap documents
1167
1353
 
1168
1354
  Documents are workspace-level: exactly ONE copy per workspace, never per-area. No document
1169
- command takes an area, and \`orbitmap context\` already lists them.
1355
+ command takes an area, and their metadata (slug, when to use) already rides the context
1356
+ payload your session focus was matched from (see Session focus in the \`orbitmap\` skill —
1357
+ ensure, don't re-call).
1170
1358
 
1171
1359
  ## Goal
1172
1360
  Read and update OrbitMap documents efficiently: pull only the context you need (TOC →
@@ -1196,7 +1384,19 @@ conversation.
1196
1384
  - Update: \`orbitmap doc-update <slug> --file <file.md>\` (replaces content, bumps
1197
1385
  version).
1198
1386
  - To change an OrbitMap document, ALWAYS go through these commands — NEVER edit files
1199
- inside the OrbitMap workspace/cache directories directly.`;
1387
+ inside the OrbitMap workspace/cache directories directly.
1388
+
1389
+ ## Editing safely — documents have NO revert (known server defects: IS-8wwkb9)
1390
+ - Prefer section ops (\`doc-patch --replace-section/--insert-section\`); use line-based
1391
+ ops only when no section op can express the change — line coordinates are shifted
1392
+ server-side assuming ASCENDING order, and blank edges of op content get trimmed.
1393
+ - The section parser is not fence-aware: a line-start \`#\` INSIDE a code block is taken
1394
+ for a heading and becomes a section boundary. Keep code-block comments inline
1395
+ (\`cmd # comment\`), and check target sections for this hazard BEFORE replacing them.
1396
+ - Never read a document between a \`doc-update\` upload and its confirm — a cached read
1397
+ makes the confirm silently re-save the OLD content while still bumping the version.
1398
+ - After ANY write, re-read the changed section (or TOC for structure) and verify the
1399
+ result actually matches what you sent. A bumped version number is not proof.`;
1200
1400
  export const SKILLS = [
1201
1401
  {
1202
1402
  name: 'orbitmap',
@@ -1234,32 +1434,32 @@ export const SKILLS = [
1234
1434
  // Claude variant — §8.2, verbatim (without the markers, which buildClaudeHook adds).
1235
1435
  export const THIN_HOOK_CLAUDE = `## OrbitMap
1236
1436
 
1237
- This project tracks work in OrbitMap via the \`orbitmap\` CLI (cloud or local files alike).
1238
- You work in a WORKSPACE: run \`orbitmap context\` first one call gives the workspace, your
1239
- areas, the active mission, open intents, tasks and documents. Never ask which area — it
1240
- follows from the directory (map in \`.orbitmap/config.json\`); missions, intents and docs
1241
- need none. When the user mentions tasks, backlog, missions, intents, ideas, issues, vibes,
1242
- or design, load the matching skill: \`orbitmap\` (core), \`orbitmap-execute\` (tasks),
1243
- \`orbitmap-plan\` (missions/intents/ideas/issues), \`orbitmap-brainstorm\` (idea outcome),
1244
- \`orbitmap-design\` (intent solutions), \`orbitmap-docs\` (documents).
1245
- Golden rules: ONE task at a time per worker the execute skill orchestrates intents; NEVER
1246
- finish without a final \`orbitmap log\` entry and \`orbitmap status\` update — finished work
1247
- defaults to \`in_review\`, not \`done\`. NEVER edit workspace files directly always use \`orbitmap\`.`;
1437
+ Work is tracked in OrbitMap via the \`orbitmap\` CLI. You work in a WORKSPACE, which can span
1438
+ several repositories: each repo is an AREA, while missions, intents and documents belong to
1439
+ the workspace itself, not to any one repo.
1440
+ Load the OrbitMap skills whenever the user wants to build, add, change or fix something, in
1441
+ whatever words they use do not wait for OrbitMap vocabulary. Load them too when they talk
1442
+ about tracking work (backlog, tasks, missions, intents, ideas, issues, documents, planning).
1443
+ Nothing gets built before it is framed: a feature, component or behaviour change gets an intent
1444
+ — outcome (brainstorm) → design → plan → build (execute), one gate at a time, written to the
1445
+ intent as you go. Small self-contained work (a typo, an obvious one-file fix) is just a task.
1446
+ NEVER finish a task, intent or mission without a final \`orbitmap log\` entry and a status update;
1447
+ the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.`;
1248
1448
  // Non-Claude variant: same rules, but points at the inlined sections below instead of
1249
1449
  // skills that these agents cannot load.
1250
1450
  export const THIN_HOOK_GENERIC = `## OrbitMap
1251
1451
 
1252
- This project tracks work in OrbitMap via the \`orbitmap\` CLI (cloud or local files alike).
1253
- You work in a WORKSPACE: run \`orbitmap context\` first one call gives the workspace, your
1254
- areas, the active mission, open intents, tasks and documents. Never ask which area — it
1255
- follows from the directory (map in \`.orbitmap/config.json\`); missions, intents and docs
1256
- need none. When the user mentions tasks, backlog, missions, intents, ideas, issues, vibes,
1257
- or design, follow the sections below: core (context & commands), working on tasks,
1258
- planning (missions/intents/ideas/issues), framing an idea into an outcome, designing an
1259
- intent's solution, and documents.
1260
- Golden rules: ONE task at a time per worker intent execution orchestrates its tasks; NEVER
1261
- finish a task session without a final \`orbitmap log\` entry and an \`orbitmap status\` update;
1262
- finished work defaults to \`in_review\`, not \`done\`. NEVER edit workspace files directly always use \`orbitmap\`.`;
1452
+ Work is tracked in OrbitMap via the \`orbitmap\` CLI. You work in a WORKSPACE, which can span
1453
+ several repositories: each repo is an AREA, while missions, intents and documents belong to
1454
+ the workspace itself, not to any one repo.
1455
+ Follow the sections below whenever the user wants to build, add, change or fix something, in
1456
+ whatever words they use do not wait for OrbitMap vocabulary. Follow them too when they talk
1457
+ about tracking work (backlog, tasks, missions, intents, ideas, issues, documents, planning).
1458
+ Nothing gets built before it is framed: a feature, component or behaviour change gets an intent
1459
+ outcome (brainstorm) → design → plan → build (execute), one gate at a time, written to the
1460
+ intent as you go. Small self-contained work (a typo, an obvious one-file fix) is just a task.
1461
+ NEVER finish a task, intent or mission without a final \`orbitmap log\` entry and a status update;
1462
+ the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.`;
1263
1463
  // ── Assembly helpers ───────────────────────────────────────────────────────────
1264
1464
  /** Build one SKILL.md file (frontmatter + body) for Claude. */
1265
1465
  export function buildSkillFile(skill) {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../src/agent-instructions.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,wEAAwE;AACxE,EAAE;AACF,2DAA2D;AAC3D,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,qEAAqE;AACrE,6E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M,UAAU,cAAc,CAAC,KAAe;IAC5C,OAAO,GAAG,KAAK,CAAC,WAAW,OAAO,KAAK,CAAC,IAAI,IAAI,CAAC;AACnD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GACrC,uFAAuF;IACvF,uFAAuF;IACvF,sFAAsF;IACtF,0EAA0E,CAAC;AAE7E;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,QAA4B,MAAM;IAChE,MAAM,IAAI,GACR,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,gBAAgB,KAAK,0BAA0B,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAChG,OAAO,GAAG,YAAY,KAAK,IAAI,KAAK,UAAU,EAAE,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrE,OAAO,GAAG,YAAY,KAAK,iBAAiB,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;AAC7E,CAAC"}
1
+ {"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../src/agent-instructions.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,wEAAwE;AACxE,EAAE;AACF,2DAA2D;AAC3D,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,qEAAqE;AACrE,6EAA6E;AAC7E,oFAAoF;AACpF,4DAA4D;AAC5D,8EAA8E;AAC9E,6EAA6E;AAC7E,kFAAkF;AAClF,8EAA8E;AAC9E,qFAAqF;AACrF,sFAAsF;AACtF,uFAAuF;AACvF,uFAAuF;AACvF,yFAAyF;AACzF,mFAAmF;AACnF,qFAAqF;AACrF,4EAA4E;AAC5E,oFAAoF;A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