orbitmap 0.6.0 → 0.8.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.
- package/LICENSE +21 -21
- package/README.md +29 -13
- package/dist/adapters/cloud.d.ts +17 -2
- package/dist/adapters/cloud.js +22 -4
- package/dist/adapters/cloud.js.map +1 -1
- package/dist/adapters/local/adapter.d.ts +4 -1
- package/dist/adapters/local/adapter.js +4 -2
- package/dist/adapters/local/adapter.js.map +1 -1
- package/dist/adapters/local/entities/planning.d.ts +8 -2
- package/dist/adapters/local/entities/planning.js +34 -3
- package/dist/adapters/local/entities/planning.js.map +1 -1
- package/dist/adapters/local/entities/tasks.d.ts +1 -1
- package/dist/adapters/local/entities/tasks.js +33 -1
- package/dist/adapters/local/entities/tasks.js.map +1 -1
- package/dist/adapters/local/entities/work-items.d.ts +12 -1
- package/dist/adapters/local/entities/work-items.js +42 -13
- package/dist/adapters/local/entities/work-items.js.map +1 -1
- package/dist/adapters/types.d.ts +39 -1
- package/dist/agent-instructions.d.ts +32 -17
- package/dist/agent-instructions.js +193 -77
- package/dist/agent-instructions.js.map +1 -1
- package/dist/commands/context.js +15 -5
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/create.d.ts +1 -0
- package/dist/commands/create.js +17 -6
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/doc-patch.d.ts +1 -3
- package/dist/commands/doc-patch.js +54 -8
- package/dist/commands/doc-patch.js.map +1 -1
- package/dist/commands/ideas.d.ts +17 -0
- package/dist/commands/ideas.js +35 -2
- package/dist/commands/ideas.js.map +1 -1
- package/dist/commands/init.js +0 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/intent.d.ts +22 -0
- package/dist/commands/intent.js +120 -16
- package/dist/commands/intent.js.map +1 -1
- package/dist/commands/mission.d.ts +1 -0
- package/dist/commands/mission.js +1 -1
- package/dist/commands/mission.js.map +1 -1
- package/dist/commands/orbit.d.ts +1 -0
- package/dist/commands/orbit.js +1 -1
- package/dist/commands/orbit.js.map +1 -1
- package/dist/commands/setup-agent.d.ts +35 -14
- package/dist/commands/setup-agent.js +128 -57
- package/dist/commands/setup-agent.js.map +1 -1
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +7 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/errors.d.ts +25 -1
- package/dist/errors.js +10 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.js +52 -13
- package/dist/index.js.map +1 -1
- package/dist/output.js +12 -0
- package/dist/output.js.map +1 -1
- package/dist/work-log.js +8 -0
- package/dist/work-log.js.map +1 -1
- package/dist/write-target.d.ts +13 -3
- package/dist/write-target.js +40 -3
- package/dist/write-target.js.map +1 -1
- package/package.json +1 -1
- package/dist/commands/projects.d.ts +0 -3
- package/dist/commands/projects.js +0 -28
- package/dist/commands/projects.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Single source of truth for all OrbitMap agent-facing instruction text.
|
|
2
2
|
//
|
|
3
3
|
// THIS FILE IS THE CANONICAL HOME of the skills. `orbitmap init` installs them; the
|
|
4
|
-
// copies under `~/.claude/skills/` (or a project's `.claude/skills/`)
|
|
5
|
-
// not sources. Edit here, then re-install — never the other way around.
|
|
4
|
+
// copies under `~/.claude/skills/`, `~/.codex/skills/` (or a project's `.claude/skills/`)
|
|
5
|
+
// are INSTALLS, not sources. Edit here, then re-install — never the other way around.
|
|
6
6
|
//
|
|
7
7
|
// Two layers, mirroring how the OrbitMap MCP server works:
|
|
8
8
|
// 1. THIN_HOOK — always-on, injected into CLAUDE.md / AGENTS.md (~10 lines).
|
|
@@ -29,16 +29,18 @@
|
|
|
29
29
|
// workers read INSTEAD of the skill
|
|
30
30
|
// (see SkillDef.references).
|
|
31
31
|
// orbitmap-docs — documents
|
|
32
|
-
// Shipped two ways
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
32
|
+
// Shipped two ways, chosen by what the agent CAN DO, never by its
|
|
33
|
+
// name (see AgentDef.skillsDirName in commands/setup-agent.ts):
|
|
34
|
+
// - skills-capable agents (Claude Code and Codex today): one
|
|
35
|
+
// `<skills dir>/<name>/SKILL.md` per skill, plus
|
|
36
|
+
// any `references/*` files, loaded on demand (zero
|
|
37
|
+
// per-turn context cost).
|
|
38
|
+
// - agents with no skill ecosystem: all skill BODIES concatenated
|
|
39
|
+
// into the agent config file, because there is
|
|
40
|
+
// nothing on-demand to lean on. Reference files are
|
|
41
|
+
// not inlined: without subagent dispatch, Flow A
|
|
42
|
+
// runs serially and the worker contract folds into
|
|
43
|
+
// the executor's own rules.
|
|
42
44
|
//
|
|
43
45
|
// History: the original four skills (orbitmap, orbitmap-execute, orbitmap-plan,
|
|
44
46
|
// orbitmap-docs) were transcribed from §8 of `docs/local-mode-poc-spec.md`, itself a
|
|
@@ -174,9 +176,12 @@ ${c}task records why every decision was made and never what was built.`;
|
|
|
174
176
|
export const SKILL_ORBITMAP_FRONTMATTER = `---
|
|
175
177
|
name: orbitmap
|
|
176
178
|
description: >
|
|
177
|
-
OrbitMap project management via the orbitmap CLI
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
OrbitMap project management via the orbitmap CLI — the entry point other orbitmap-*
|
|
180
|
+
skills require. Use whenever the user wants to build, add, change or fix something, in
|
|
181
|
+
whatever words they use — do not wait for OrbitMap vocabulary — as well as when they
|
|
182
|
+
mention OrbitMap, orbit, tasks, backlog, missions, intents, ideas, issues, vibes, or ask
|
|
183
|
+
to track, plan, or log work. Covers the object model, context resolution, and command
|
|
184
|
+
reference.
|
|
180
185
|
---`;
|
|
181
186
|
export const SKILL_ORBITMAP_BODY = `# OrbitMap CLI — core
|
|
182
187
|
|
|
@@ -197,10 +202,9 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
|
|
|
197
202
|
## General behaviour
|
|
198
203
|
- Always prioritise the user's direct request. If the user asks you to do something
|
|
199
204
|
(read a file, write code, answer a question), handle that first.
|
|
200
|
-
- Only interact with OrbitMap when the user explicitly asks you to (e.g. "check my
|
|
201
|
-
tasks", "start a task", "what's on my backlog", "log this idea").
|
|
202
205
|
- When the user mentions OrbitMap, orbit, task, backlog, or project-management concepts
|
|
203
|
-
in the context of tracking work
|
|
206
|
+
in the context of tracking work — in whatever words they use — use \`orbitmap\` commands
|
|
207
|
+
to handle the request.
|
|
204
208
|
|
|
205
209
|
## Object model
|
|
206
210
|
- Workspace = team level. Area = repo-level scope (formerly Project) — tasks, vibes and
|
|
@@ -210,6 +214,14 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
|
|
|
210
214
|
outside a task. Task (TS-) = unit of work.
|
|
211
215
|
- Entity numbers (TS-xxxxxx etc.) are accepted by every command that takes an id.
|
|
212
216
|
|
|
217
|
+
## Naming workitems in output
|
|
218
|
+
Refer to a workitem by its NAME together with its key, at first mention in any message,
|
|
219
|
+
summary or report — "Align skills and validators (IN-b2h63q)". NEVER a bare key: a key
|
|
220
|
+
alone is unreadable to the user, who tracks the work by name. Keep no key-to-name mapping
|
|
221
|
+
anywhere — not in a file, not in memory. Every list, \`show\` and context response already
|
|
222
|
+
pairs the two, so take the name from the response you already have; if you do not have it,
|
|
223
|
+
fetch the item rather than emitting the key on its own.
|
|
224
|
+
|
|
213
225
|
${SESSION_FOCUS_SECTION}
|
|
214
226
|
|
|
215
227
|
${FRESHNESS_SECTION}
|
|
@@ -222,10 +234,9 @@ ${FRESHNESS_SECTION}
|
|
|
222
234
|
lists and no bodies — fetch deeper on demand (\`orbitmap intent show IN-x\`,
|
|
223
235
|
\`orbitmap tasks --intent IN-x\`, \`orbitmap doc <slug>\`). Never list areas and never
|
|
224
236
|
ask the user "which area?" before you have read it.
|
|
225
|
-
- You work in a WORKSPACE, not inside a single area. Missions
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
AREA-scoped.
|
|
237
|
+
- You work in a WORKSPACE, not inside a single area. Missions and intents are
|
|
238
|
+
workspace-level and take no area. Documents live at area OR workspace level.
|
|
239
|
+
Tasks, vibes, issues and ideas are AREA-scoped.
|
|
229
240
|
- Missions and intents outrank individual tasks. Asked to work on "what matters", take the
|
|
230
241
|
active mission and open intents from context and pick work that serves them.
|
|
231
242
|
- The area follows from the directory, never from a question to the user:
|
|
@@ -281,7 +292,7 @@ backlog, todo, in_progress, in_review, review_changes, done, blocked.
|
|
|
281
292
|
- Tasks: \`orbitmap tasks [--status s1,s2] [--intent IN-x]\`, \`orbitmap task TS-x\`,
|
|
282
293
|
\`orbitmap get <ID>\`,
|
|
283
294
|
\`orbitmap start [TS-x]\`, \`orbitmap status TS-x <status> [--delivery <d>]\`,
|
|
284
|
-
\`orbitmap create "title" [--intent IN-x
|
|
295
|
+
\`orbitmap create "title" [--intent IN-x] [--priority p]\`,
|
|
285
296
|
\`orbitmap subtask TS-parent "title"\`, \`orbitmap assign TS-x [agent]\`,
|
|
286
297
|
\`orbitmap dep add|remove TS-a TS-b\`, \`orbitmap log TS-x "msg" --type <t>\`
|
|
287
298
|
- Issues: \`orbitmap issue register|list|show|status|resolve\`
|
|
@@ -309,7 +320,7 @@ description: >
|
|
|
309
320
|
the user's), and "work on TS-x" runs a single tracked task (starting/resuming,
|
|
310
321
|
logging, finishing with the correct status, git branches and delivery status). Use
|
|
311
322
|
whenever executing a planned intent or implementing, resuming, or finishing a
|
|
312
|
-
tracked task.
|
|
323
|
+
tracked task. Requires the \`orbitmap\` core skill.
|
|
313
324
|
---`;
|
|
314
325
|
export const SKILL_EXECUTE_BODY = `# Executing OrbitMap work
|
|
315
326
|
|
|
@@ -430,9 +441,12 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
|
|
|
430
441
|
branch — the intent branch is named in the report, not left underfoot. Report in
|
|
431
442
|
chat: what shipped, what was decided, what is blocked and why, deviations from the
|
|
432
443
|
plan, gate results vs baseline. Write ONE resume
|
|
433
|
-
point: \`orbitmap log IN-x "Resume point: …" --type note\`.
|
|
444
|
+
point: \`orbitmap log IN-x "Resume point: …" --type note\`. Before the transition, run
|
|
445
|
+
\`orbitmap intent show IN-x --slim\` and verify every task is \`in_review\`, \`done\`, or
|
|
446
|
+
\`blocked\` with a logged blocker — an \`in_progress\` task means a fold step was
|
|
447
|
+
skipped; fix it before moving on. Then end the run:
|
|
434
448
|
\`orbitmap intent update IN-x --status in_review --log <entries>\` — the transition's
|
|
435
|
-
response carries an Instructions section (it will ask
|
|
449
|
+
response carries an Instructions section (it will ask you to verify the outcome lines); FOLLOW it.
|
|
436
450
|
Merging and closing to \`done\` are the USER'S. The merge EVENT — whoever performs
|
|
437
451
|
it — is what later flips the tasks to \`--delivery merged\`.
|
|
438
452
|
|
|
@@ -652,7 +666,7 @@ description: >
|
|
|
652
666
|
cross-task notes in the intent plan field, and a doc-update-after-green step; then creates
|
|
653
667
|
the tasks and hands off to orbitmap-execute. Use for "plan this intent", "break this down
|
|
654
668
|
into tasks", an intent entering \`plan\` status — and for general planning (missions,
|
|
655
|
-
intents, promoting ideas, triaging issues).
|
|
669
|
+
intents, promoting ideas, triaging issues). Requires the \`orbitmap\` core skill.
|
|
656
670
|
---`;
|
|
657
671
|
export const SKILL_PLAN_BODY = `# Planning a design into executable tasks
|
|
658
672
|
|
|
@@ -776,8 +790,10 @@ ${worklogKeepDropTest(' ')}
|
|
|
776
790
|
add or fix tasks and re-check. Do NOT proceed while a gap remains.
|
|
777
791
|
7. Write cross-task PLANNING NOTES + a short SUMMARY to the intent \`plan\` field —
|
|
778
792
|
\`orbitmap intent update IN-x --plan "<notes>"\`: decisions valid for all tasks,
|
|
779
|
-
sequencing rationale, and the coverage argument.
|
|
780
|
-
|
|
793
|
+
sequencing rationale, and the coverage argument. Start the field with "# Summary"
|
|
794
|
+
— a paragraph summing up the whole field — then the body. The server reads that section
|
|
795
|
+
as the field's TL;DR and flags a field written without one.
|
|
796
|
+
This REPLACES any seed notes that were in the field — you have already absorbed them.
|
|
781
797
|
8. Ensure a final DOC-UPDATE task exists: after the implementation is done and all tests
|
|
782
798
|
are green, update the OrbitMap documentation (see the \`orbitmap-docs\` skill).
|
|
783
799
|
9. SELF-REVIEW the plan with fresh eyes (see the Self-review section) and fix issues inline.
|
|
@@ -868,12 +884,15 @@ triaging issues):
|
|
|
868
884
|
- **Missions:** \`orbitmap mission list|show MS-x\`; \`orbitmap mission create "name"
|
|
869
885
|
[--outcome "…"] [--start d] [--end d]\`; \`orbitmap mission status MS-x
|
|
870
886
|
active|completed|cancelled\` (activating fails while another is active — complete/cancel
|
|
871
|
-
it first); \`orbitmap mission link|unlink MS-x
|
|
887
|
+
it first); \`orbitmap mission link|unlink MS-x --type task|issue|idea|intent --id <uuid>\`
|
|
888
|
+
(the linked object goes by UUID — this endpoint rejects display numbers). A mission status
|
|
872
889
|
change takes the same repeatable \`--log <type>:<content>\` and is refused (422) without
|
|
873
890
|
at least one entry — \`cancelled\` above all needs its \`decision:"<why abandoned>"\`.
|
|
874
891
|
\`orbitmap log MS-x "…" --type …\` logs against a mission outside a transition.
|
|
875
|
-
- **Intents:** \`orbitmap intent create "name" [--outcome "…"] [--design "…"] [--plan "…"]
|
|
876
|
-
|
|
892
|
+
- **Intents:** \`orbitmap intent create "name" [--outcome "…"] [--design "…"] [--plan "…"]\`
|
|
893
|
+
(there is no \`--mission\` flag — attach after creation with \`orbitmap mission link MS-x
|
|
894
|
+
--type intent --id <uuid>\`), statuses new → design → plan → build → done (or
|
|
895
|
+
cancelled). The
|
|
877
896
|
\`outcome\` is the north star, \`design\` the agreed solution, \`plan\` the agreed build
|
|
878
897
|
plan — produced by the \`orbitmap-brainstorm\` / \`orbitmap-design\` / \`orbitmap-plan\`
|
|
879
898
|
gates respectively.
|
|
@@ -918,7 +937,8 @@ description: >
|
|
|
918
937
|
time until the outcome is AGREED, writes that outcome to the intent's outcome field, and
|
|
919
938
|
files useful asides to the design (and, when relevant, plan) fields for the later gates.
|
|
920
939
|
Use for "I have an idea", "brainstorm this", "let's think through X", "what should we
|
|
921
|
-
build/do about X", shaping an intent's outcome, or an intent at \`new\` status.
|
|
940
|
+
build/do about X", shaping an intent's outcome, or an intent at \`new\` status. Requires
|
|
941
|
+
the \`orbitmap\` core skill.
|
|
922
942
|
---`;
|
|
923
943
|
export const SKILL_BRAINSTORM_BODY = `# Framing an idea into an outcome
|
|
924
944
|
|
|
@@ -964,6 +984,9 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
|
|
|
964
984
|
ONE question. Prefer proposing a sensible default for the user to correct over an open
|
|
965
985
|
interrogation. Aim for the few highest-leverage questions — "one question at a time" sets
|
|
966
986
|
the pace, not the total count.
|
|
987
|
+
- **Answer before asking.** When the user's turn contains a question, answer it first —
|
|
988
|
+
completely — before asking your own. Never return a question with a question; an
|
|
989
|
+
unanswered user question makes every next question feel like an interrogation.
|
|
967
990
|
- **Lead with a recommendation.** Present options and the outcome conversationally, leading
|
|
968
991
|
with the option you recommend and WHY — never a flat, neutral menu with no steer.
|
|
969
992
|
- **YAGNI.** Cut every want that does not serve the outcome; a smaller outcome ships.
|
|
@@ -986,6 +1009,57 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
|
|
|
986
1009
|
validation) into the design notes, never into the agreed outcome. Do not slip into
|
|
987
1010
|
solutioning.
|
|
988
1011
|
|
|
1012
|
+
## Outcome lines
|
|
1013
|
+
|
|
1014
|
+
One promise per line, written as the user would read it in release notes. Subject is
|
|
1015
|
+
the user, a named role, or the product acting for the user — never "you", "we", "I",
|
|
1016
|
+
the team, the code or the field. Shape: "(user) can (do what)" or
|
|
1017
|
+
"(product) no longer (pain)".
|
|
1018
|
+
|
|
1019
|
+
Sources: the outcome field first; when it is thin, the work log's decision and
|
|
1020
|
+
release-note entries; never the design or plan.
|
|
1021
|
+
|
|
1022
|
+
Each line passes six tests, or is rewritten / moved:
|
|
1023
|
+
NOTICE — would a user notice it without reading code, tests or the tracker?
|
|
1024
|
+
(nothing changes → Out of scope)
|
|
1025
|
+
STRANGER — would a new customer understand it? (no keys, dates, "decided by")
|
|
1026
|
+
CODE — no file, class, column, endpoint, flag, or surface list shown for
|
|
1027
|
+
coverage; one surface may be named when the behaviour lives only there
|
|
1028
|
+
(mechanism → What changes or design)
|
|
1029
|
+
ONE-THING — one promise; a second clause may only say why it matters or what it
|
|
1030
|
+
replaces — "and", a semicolon joining two promises, a second field or
|
|
1031
|
+
view → split or drop
|
|
1032
|
+
ACTOR — every verb has one unambiguous doer (the user accepts, the system
|
|
1033
|
+
tests); no "opens/gets/begins" where a person or the system could be meant
|
|
1034
|
+
REFERENT — nothing points outside the line: no "this", "it", "lists", "the field"
|
|
1035
|
+
without naming which
|
|
1036
|
+
|
|
1037
|
+
1–7 lines, ≤160 chars each: title, one line of description, the user type in brackets
|
|
1038
|
+
at the end. Highest impact to the user or product first. More than 7 on a new intent →
|
|
1039
|
+
propose a second intent; on an already-built intent → merge the lowest-impact lines.
|
|
1040
|
+
|
|
1041
|
+
User type: [user] anyone working in OrbitMap; [customer] the account owner's view —
|
|
1042
|
+
security, data, billing, upgrade notices; [internal] only the OrbitMap team notices.
|
|
1043
|
+
An all-[internal] list is allowed; never force a user line.
|
|
1044
|
+
|
|
1045
|
+
Examples:
|
|
1046
|
+
Bad: "TaskDetail's unlocked taskId allowing cross-account read+write (IS-x4uxur) closes"
|
|
1047
|
+
Good: "No one can open or edit a task from another account, even with its link. [customer]"
|
|
1048
|
+
Bad: "DB enum + Postgres triggers, Agent API + fixtures, UI, CLI, MCP carry 'cancelled'"
|
|
1049
|
+
Good: "A task can be cancelled instead of being marked done with a disclaimer. [user]"
|
|
1050
|
+
Bad: "You can write work-log entries on an issue, same as on a task."
|
|
1051
|
+
Good: "A user can write work-log entries on an issue, same as on a task. [user]"
|
|
1052
|
+
|
|
1053
|
+
If the user's shorthand can be read two ways, still propose the line and end it with
|
|
1054
|
+
"? <question>"; a "?" line never enters the field. No input to work from → say so and
|
|
1055
|
+
ask what should change and for whom; never invent.
|
|
1056
|
+
|
|
1057
|
+
Propose the list in the terminal in this exact format. The user accepts or comments;
|
|
1058
|
+
refine and re-propose until the user accepts the whole list. Then re-read each
|
|
1059
|
+
accepted line as a customer reading the changelog email; flag any line that can still
|
|
1060
|
+
be read two ways. Write only the accepted lines, as the first paragraph of the outcome
|
|
1061
|
+
field.
|
|
1062
|
+
|
|
989
1063
|
## Flow
|
|
990
1064
|
1. Gather context.
|
|
991
1065
|
- Ensure session focus (see Session focus in the \`orbitmap\` skill): a valid focus
|
|
@@ -1023,13 +1097,22 @@ ${worklogKeepDropTest(' ')}
|
|
|
1023
1097
|
- \`note\` is the CATCH-ALL — anything useful that is not \`code_change\` / \`decision\` /
|
|
1024
1098
|
\`blocker\` goes in as \`note\`, with \`--meta\` for unusual structure. There is deliberately
|
|
1025
1099
|
NO \`other\` type. NEVER write \`status_change\`: the server authors it on every transition.
|
|
1026
|
-
3.
|
|
1027
|
-
OUT of scope and how success will be
|
|
1028
|
-
|
|
1100
|
+
3. Propose the OUTCOME LINES in the terminal (see Outcome lines) together with what is
|
|
1101
|
+
explicitly OUT of scope and how success will be checked. The user accepts or comments;
|
|
1102
|
+
refine and re-propose until the user accepts the whole list — never proceed on a vague
|
|
1103
|
+
or assumed outcome, and never write a line the user has not accepted.
|
|
1029
1104
|
4. Persist (create or refine). Update an existing unprocessed intent, or create one:
|
|
1030
1105
|
\`orbitmap intent update IN-x --outcome "<agreed outcome>" [--design "<design notes>"] [--plan "<plan notes>"]\`
|
|
1031
1106
|
/ \`orbitmap intent create "<name>" --outcome "<agreed outcome>" [--design "…"] [--plan "…"]\`.
|
|
1032
|
-
|
|
1107
|
+
Write the outcome field in the template: "# Outcomes list" holding ONLY the accepted
|
|
1108
|
+
lines (see Outcome lines), "# Why", then the chapters — What changes and Alternatives
|
|
1109
|
+
rejected optional; Out of scope, Success check and Source obligatory — ending with
|
|
1110
|
+
"## Source" carrying "Outcomes accepted by <who> on <YYYY-MM-DD>". Soft ceiling
|
|
1111
|
+
~1,500 words: above it, move material to design or plan. Design and plan notes start
|
|
1112
|
+
with "# Summary", a paragraph summing up the whole field, then the body. The server
|
|
1113
|
+
returns the outcomes list as the intent's TL;DR and refuses \`new → design\` without an
|
|
1114
|
+
accepted list.
|
|
1115
|
+
Route the captured notes by type —
|
|
1033
1116
|
HOW / tech / UX → the **design** field; build-order / task ideas / execution risks → the
|
|
1034
1117
|
**plan** field (OPTIONAL — only if the conversation produced any). Mark the user's notes
|
|
1035
1118
|
as the user's in both fields; you may add your own, kept separate. The design gate reads
|
|
@@ -1055,9 +1138,9 @@ digraph orbitmap_brainstorm {
|
|
|
1055
1138
|
"Clarify idea into an outcome, one question at a time" [shape=box];
|
|
1056
1139
|
"Log decisions passing the keep/drop test, as they land" [shape=box];
|
|
1057
1140
|
"Capture user opinions / context as notes" [shape=box];
|
|
1058
|
-
"
|
|
1059
|
-
"User
|
|
1060
|
-
"Create or refine intent:
|
|
1141
|
+
"Propose outcome lines in the terminal" [shape=box];
|
|
1142
|
+
"User accepts the whole list?" [shape=diamond];
|
|
1143
|
+
"Create or refine intent: accepted lines + template chapters" [shape=box];
|
|
1061
1144
|
"Route notes to design/plan fields by type (marked as the user's)" [shape=box];
|
|
1062
1145
|
"Promote referenced idea to used" [shape=box];
|
|
1063
1146
|
"Advance status new to design, with --log entries (refused if none)" [shape=box];
|
|
@@ -1066,11 +1149,11 @@ digraph orbitmap_brainstorm {
|
|
|
1066
1149
|
"Gather context: Orb (intents / idea) + repo (files, docs, commits)" -> "Clarify idea into an outcome, one question at a time";
|
|
1067
1150
|
"Clarify idea into an outcome, one question at a time" -> "Log decisions passing the keep/drop test, as they land";
|
|
1068
1151
|
"Log decisions passing the keep/drop test, as they land" -> "Capture user opinions / context as notes";
|
|
1069
|
-
"Capture user opinions / context as notes" -> "
|
|
1070
|
-
"
|
|
1071
|
-
"User
|
|
1072
|
-
"User
|
|
1073
|
-
"Create or refine intent:
|
|
1152
|
+
"Capture user opinions / context as notes" -> "Propose outcome lines in the terminal";
|
|
1153
|
+
"Propose outcome lines in the terminal" -> "User accepts the whole list?";
|
|
1154
|
+
"User accepts the whole list?" -> "Propose outcome lines in the terminal" [label="comments, refine"];
|
|
1155
|
+
"User accepts the whole list?" -> "Create or refine intent: accepted lines + template chapters" [label="yes"];
|
|
1156
|
+
"Create or refine intent: accepted lines + template chapters" -> "Route notes to design/plan fields by type (marked as the user's)";
|
|
1074
1157
|
"Route notes to design/plan fields by type (marked as the user's)" -> "Promote referenced idea to used";
|
|
1075
1158
|
"Promote referenced idea to used" -> "Advance status new to design, with --log entries (refused if none)";
|
|
1076
1159
|
"Advance status new to design, with --log entries (refused if none)" -> "Offer orbitmap-design (review or design?)";
|
|
@@ -1080,7 +1163,9 @@ digraph orbitmap_brainstorm {
|
|
|
1080
1163
|
## After the outcome
|
|
1081
1164
|
Before handing off, review the agreed outcome with fresh eyes:
|
|
1082
1165
|
- **Vague or assumed?** Is it concrete and in the user's words, or did you fill gaps? Fix.
|
|
1083
|
-
- **Unmeasurable?** Can you tell when it is met? If not, sharpen the
|
|
1166
|
+
- **Unmeasurable?** Can you tell when it is met? If not, sharpen the Success check.
|
|
1167
|
+
- **Every line clean?** Re-run the six tests on each accepted line; a line that fails is
|
|
1168
|
+
rewritten and re-accepted, never silently changed.
|
|
1084
1169
|
- **Too big?** If it needs several independent designs, decompose into sibling intents and
|
|
1085
1170
|
frame the first — do not hand design an outcome that is really three outcomes.
|
|
1086
1171
|
Then write it (Flow step 4), advance \`new → design\`, and hand the baton to
|
|
@@ -1104,8 +1189,10 @@ Then write it (Flow step 4), advance \`new → design\`, and hand the baton to
|
|
|
1104
1189
|
- Create-or-refine: reuse an existing unprocessed intent instead of creating a duplicate.
|
|
1105
1190
|
- Ground the outcome in verified repo/tracker reality, not the plan doc or a stated claim —
|
|
1106
1191
|
check it is still needed and still undone before framing.
|
|
1107
|
-
- Keep the outcome WHAT/WHY:
|
|
1108
|
-
HOW answers into the design notes.
|
|
1192
|
+
- Keep the outcome WHAT/WHY: the accepted lines say WHAT, the Why chapter says WHY; name
|
|
1193
|
+
what is OUT of scope and how success is checked; push HOW answers into the design notes.
|
|
1194
|
+
- Only accepted lines enter the field — no proposed lines, no "?" lines, no
|
|
1195
|
+
proposed/accepted marks; the acceptance record under Source is the user's consent.
|
|
1109
1196
|
- If the intent already has an agreed outcome (status \`design\` or later), step aside and
|
|
1110
1197
|
point at \`orbitmap-design\` — do not re-frame a settled outcome.
|
|
1111
1198
|
- Never auto-chain into designing after framing — always ask first.`;
|
|
@@ -1118,7 +1205,8 @@ description: >
|
|
|
1118
1205
|
technical spec, and UX (when there's UI), one question at a time, then writes the
|
|
1119
1206
|
result to the intent's design field. Use for "design this intent", "let's design X", or
|
|
1120
1207
|
an intent entering \`design\` status. Use it once the outcome is agreed; if the outcome is
|
|
1121
|
-
still missing or vague, step aside to \`orbitmap-brainstorm\` first.
|
|
1208
|
+
still missing or vague, step aside to \`orbitmap-brainstorm\` first. Requires the
|
|
1209
|
+
\`orbitmap\` core skill.
|
|
1122
1210
|
---`;
|
|
1123
1211
|
export const SKILL_DESIGN_BODY = `# Designing an intent's solution
|
|
1124
1212
|
|
|
@@ -1151,6 +1239,11 @@ holds a real design doc instead of raw notes, treat it as existing design to ref
|
|
|
1151
1239
|
## Key principles
|
|
1152
1240
|
- **Serve the outcome.** Every question and every section traces back to the outcome; if
|
|
1153
1241
|
it does not, cut it or go fix the outcome first.
|
|
1242
|
+
- **Anchor every question to an outcome.** Open each question with the outcome it
|
|
1243
|
+
serves, quoted by number and short title — "For outcome 3 (verified outcomes get a
|
|
1244
|
+
done check): what does the mark mean at review, and what does done require?" — so
|
|
1245
|
+
the user always knows which promise the decision shapes. A question that fits no
|
|
1246
|
+
outcome is a sign the outcome list is incomplete: raise that, do not ask the question.
|
|
1154
1247
|
- **One question at a time.** Refine by dialogue, never a questionnaire dump.
|
|
1155
1248
|
- **Prefer multiple choice — open questions are a LAST RESORT.** When a question's options
|
|
1156
1249
|
can be enumerated, ALWAYS offer them as a multiple choice with a recommended default; ask
|
|
@@ -1162,6 +1255,9 @@ holds a real design doc instead of raw notes, treat it as existing design to ref
|
|
|
1162
1255
|
ONE question. Prefer proposing a sensible default for the user to correct over an open
|
|
1163
1256
|
interrogation. Aim for the few highest-leverage questions — "one question at a time" sets
|
|
1164
1257
|
the pace, not the total count.
|
|
1258
|
+
- **Answer before asking.** When the user's turn contains a question, answer it first —
|
|
1259
|
+
completely — before asking your own. Never return a question with a question; an
|
|
1260
|
+
unanswered user question makes every next question feel like an interrogation.
|
|
1165
1261
|
- **Lead with a recommendation.** When you propose approaches or technical options, lead
|
|
1166
1262
|
with the one you recommend and WHY — never a flat, neutral menu with no steer.
|
|
1167
1263
|
- **YAGNI.** Cut every part of the design that does not serve the outcome; a smaller
|
|
@@ -1248,7 +1344,10 @@ ${worklogKeepDropTest(' ')}
|
|
|
1248
1344
|
5. Present the draft in sections scaled to their complexity (a few sentences when simple,
|
|
1249
1345
|
more when nuanced); after each section ask whether it looks right, and get the user's
|
|
1250
1346
|
approval before writing anything.
|
|
1251
|
-
6. Write it: \`orbitmap intent update IN-x --design "<doc>"\`.
|
|
1347
|
+
6. Write it: \`orbitmap intent update IN-x --design "<doc>"\`. Start the field with "# Summary"
|
|
1348
|
+
— a paragraph summing up the whole field — then the body. The server reads that section
|
|
1349
|
+
as the field's TL;DR and flags a field written without one.
|
|
1350
|
+
This REPLACES any framing
|
|
1252
1351
|
notes that were in the field — you have already absorbed them into the doc. When the
|
|
1253
1352
|
spec names the repos the build will touch, declare them on the intent in the same
|
|
1254
1353
|
update — \`--areas <slug>,<slug>\` — so session-focus matching works from declared data.
|
|
@@ -1346,14 +1445,14 @@ name: orbitmap-docs
|
|
|
1346
1445
|
description: >
|
|
1347
1446
|
Reading and updating OrbitMap documents (specs, architecture, guides, decisions).
|
|
1348
1447
|
Use when the user asks to read, import, or update project documentation tracked in
|
|
1349
|
-
OrbitMap.
|
|
1448
|
+
OrbitMap. Requires the \`orbitmap\` core skill.
|
|
1350
1449
|
---`;
|
|
1351
1450
|
export const SKILL_DOCS_BODY = `# OrbitMap documents
|
|
1352
1451
|
|
|
1353
|
-
Documents
|
|
1354
|
-
|
|
1355
|
-
payload your session focus was matched from (see
|
|
1356
|
-
ensure, don't re-call).
|
|
1452
|
+
Documents live at area or workspace level: \`orbitmap docs\` lists every document you can
|
|
1453
|
+
reach — your areas' documents plus the workspace-level ones — and their metadata (slug,
|
|
1454
|
+
when to use) already rides the context payload your session focus was matched from (see
|
|
1455
|
+
Session focus in the \`orbitmap\` skill — ensure, don't re-call).
|
|
1357
1456
|
|
|
1358
1457
|
## Goal
|
|
1359
1458
|
Read and update OrbitMap documents efficiently: pull only the context you need (TOC →
|
|
@@ -1378,22 +1477,22 @@ for the full content, read that file instead of printing the content into the
|
|
|
1378
1477
|
conversation.
|
|
1379
1478
|
|
|
1380
1479
|
## Editing
|
|
1381
|
-
- Import a new document: \`orbitmap doc-import <file.md> --
|
|
1382
|
-
spec|architecture|api|guide|decision|changelog|other [--context "…"]\`.
|
|
1480
|
+
- Import a new document: \`orbitmap doc-import <title> --file <file.md> --type
|
|
1481
|
+
spec|architecture|api|guide|decision|changelog|other [--context "…"]\`. It lands
|
|
1482
|
+
area-level, resolved from the current directory; add \`--workspace-id <slug-or-uuid>\`
|
|
1483
|
+
to create it workspace-level instead.
|
|
1383
1484
|
- Update: \`orbitmap doc-update <slug> --file <file.md>\` (replaces content, bumps
|
|
1384
1485
|
version).
|
|
1385
1486
|
- To change an OrbitMap document, ALWAYS go through these commands — NEVER edit files
|
|
1386
1487
|
inside the OrbitMap workspace/cache directories directly.
|
|
1387
1488
|
|
|
1388
|
-
## Editing safely — documents have NO revert
|
|
1389
|
-
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
- Never read a document between a \`doc-update\` upload and its confirm — a cached read
|
|
1396
|
-
makes the confirm silently re-save the OLD content while still bumping the version.
|
|
1489
|
+
## Editing safely — documents have NO revert
|
|
1490
|
+
- Section ops are the only ops (\`doc-patch --replace-section/--insert-section/
|
|
1491
|
+
--delete-section/--append\`); the line-based ones are gone. On a document with an
|
|
1492
|
+
unclosed code fence every patch op is REFUSED — repair it with a full \`doc-update\`.
|
|
1493
|
+
\`doc-patch --dry-run\` reports the boundaries each op would touch, without writing.
|
|
1494
|
+
- The section parser is fence-aware: a line-start \`#\` inside a code block is never a
|
|
1495
|
+
section boundary, and a patch whose result would leave an unclosed fence is refused.
|
|
1397
1496
|
- After ANY write, re-read the changed section (or TOC for structure) and verify the
|
|
1398
1497
|
result actually matches what you sent. A bumped version number is not proof.`;
|
|
1399
1498
|
export const SKILLS = [
|
|
@@ -1430,8 +1529,12 @@ export const SKILLS = [
|
|
|
1430
1529
|
},
|
|
1431
1530
|
];
|
|
1432
1531
|
// ── The thin always-on hook (CLAUDE.md / AGENTS.md) ────────────────────────────
|
|
1433
|
-
//
|
|
1434
|
-
|
|
1532
|
+
// The hook for every agent that can LOAD skills — Claude Code and Codex today, whichever
|
|
1533
|
+
// agent gains a skills directory next. §8.2, verbatim (without the markers, which
|
|
1534
|
+
// buildSkillsBlock adds). It was written for Claude and used to be named after it, but
|
|
1535
|
+
// nothing in the text is Claude-specific: it only says WHEN to load the skills, and any
|
|
1536
|
+
// agent that discovers `<name>/SKILL.md` can act on it.
|
|
1537
|
+
export const THIN_HOOK_SKILLS = `## OrbitMap
|
|
1435
1538
|
|
|
1436
1539
|
Work is tracked in OrbitMap via the \`orbitmap\` CLI. You work in a WORKSPACE, which can span
|
|
1437
1540
|
several repositories: each repo is an AREA, while missions, intents and documents belong to
|
|
@@ -1439,14 +1542,15 @@ the workspace itself, not to any one repo.
|
|
|
1439
1542
|
Load the OrbitMap skills whenever the user wants to build, add, change or fix something, in
|
|
1440
1543
|
whatever words they use — do not wait for OrbitMap vocabulary. Load them too when they talk
|
|
1441
1544
|
about tracking work (backlog, tasks, missions, intents, ideas, issues, documents, planning).
|
|
1545
|
+
Load the core skill 'orbitmap' first, before any other orbitmap-* skill — they all build on it.
|
|
1442
1546
|
Nothing gets built before it is framed: a feature, component or behaviour change gets an intent
|
|
1443
1547
|
— outcome (brainstorm) → design → plan → build (execute), one gate at a time, written to the
|
|
1444
1548
|
intent as you go. Small self-contained work (a typo, an obvious one-file fix) is just a task.
|
|
1445
1549
|
NEVER finish a task, intent or mission without a final \`orbitmap log\` entry and a status update;
|
|
1446
1550
|
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.
|
|
1447
1551
|
OrbitMap tool responses may carry an Instructions section — act on it before continuing.`;
|
|
1448
|
-
//
|
|
1449
|
-
//
|
|
1552
|
+
// The variant for agents with NO skill ecosystem: same rules, but it points at the
|
|
1553
|
+
// inlined sections below, because there are no skill files for these agents to load.
|
|
1450
1554
|
export const THIN_HOOK_GENERIC = `## OrbitMap
|
|
1451
1555
|
|
|
1452
1556
|
Work is tracked in OrbitMap via the \`orbitmap\` CLI. You work in a WORKSPACE, which can span
|
|
@@ -1462,34 +1566,46 @@ NEVER finish a task, intent or mission without a final \`orbitmap log\` entry an
|
|
|
1462
1566
|
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.
|
|
1463
1567
|
OrbitMap tool responses may carry an Instructions section — act on it before continuing.`;
|
|
1464
1568
|
// ── Assembly helpers ───────────────────────────────────────────────────────────
|
|
1465
|
-
/**
|
|
1569
|
+
/**
|
|
1570
|
+
* Build one SKILL.md file (frontmatter + body). The layout is the same for every
|
|
1571
|
+
* skills-capable agent — Claude Code and Codex read identical frontmatter — so one
|
|
1572
|
+
* renderer serves all of them.
|
|
1573
|
+
*/
|
|
1466
1574
|
export function buildSkillFile(skill) {
|
|
1467
1575
|
return `${skill.frontmatter}\n\n${skill.body}\n`;
|
|
1468
1576
|
}
|
|
1469
1577
|
/**
|
|
1470
|
-
* One extra line appended to the
|
|
1578
|
+
* One extra line appended to the thin hook when the skills were installed at PROJECT
|
|
1471
1579
|
* scope. `CLAUDE.md` is inherited by every sub-directory, but a project-level
|
|
1472
1580
|
* `.claude/skills/` directory is not: a session started in a sibling or child repository
|
|
1473
1581
|
* reads this hook and cannot load the skills it names. The hook must therefore say where
|
|
1474
1582
|
* the skills actually are, and how to make them visible everywhere. At user scope the
|
|
1475
1583
|
* skills are visible wherever the hook is, so no caveat is needed.
|
|
1584
|
+
*
|
|
1585
|
+
* It names `.claude/skills/` because Claude Code is the only agent that can reach it:
|
|
1586
|
+
* project scope installs skills only for an agent that READS them at project scope, and
|
|
1587
|
+
* Codex — the other skills-capable agent — discovers skills under `$CODEX_HOME` only.
|
|
1476
1588
|
*/
|
|
1477
1589
|
export const SKILL_SCOPE_CAVEAT_PROJECT = 'These skills are installed at PROJECT scope, in this directory\'s `.claude/skills/`. ' +
|
|
1478
1590
|
'If you cannot load them (e.g. this session started in a different directory), do not ' +
|
|
1479
1591
|
'guess the workflow — ask the user to run `orbitmap setup-agent --scope user`, which ' +
|
|
1480
1592
|
'installs them into `~/.claude/skills/` where every session can see them.';
|
|
1481
1593
|
/**
|
|
1482
|
-
* Build the thin always-on block for
|
|
1594
|
+
* Build the thin always-on block for ANY skills-capable agent's config file — `CLAUDE.md`
|
|
1595
|
+
* for Claude Code, `AGENTS.md` for Codex. Both get the same block, because both load the
|
|
1596
|
+
* skills the block points at; the file it lands in is the installer's business, not this
|
|
1597
|
+
* function's.
|
|
1598
|
+
*
|
|
1483
1599
|
* `scope` is where the accompanying skill files were installed — see
|
|
1484
1600
|
* {@link SKILL_SCOPE_CAVEAT_PROJECT}.
|
|
1485
1601
|
*/
|
|
1486
|
-
export function
|
|
1487
|
-
const body = scope === 'project' ? `${
|
|
1602
|
+
export function buildSkillsBlock(scope = 'user') {
|
|
1603
|
+
const body = scope === 'project' ? `${THIN_HOOK_SKILLS}\n${SKILL_SCOPE_CAVEAT_PROJECT}` : THIN_HOOK_SKILLS;
|
|
1488
1604
|
return `${MARKER_START}\n${body}\n${MARKER_END}`;
|
|
1489
1605
|
}
|
|
1490
1606
|
/**
|
|
1491
|
-
* Build the markdown fallback block for
|
|
1492
|
-
* skill body inlined
|
|
1607
|
+
* Build the markdown fallback block for agents with no skill ecosystem: the thin hook plus
|
|
1608
|
+
* every skill body inlined, because there is nothing to load on demand.
|
|
1493
1609
|
*/
|
|
1494
1610
|
export function buildGenericBlock() {
|
|
1495
1611
|
const bodies = SKILLS.map((skill) => skill.body).join('\n\n---\n\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../src/agent-instructions.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,oFAAoF;AACpF,
|
|
1
|
+
{"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../src/agent-instructions.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,oFAAoF;AACpF,0FAA0F;AAC1F,sFAAsF;AACtF,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;AACpF,kFAAkF;AAClF,2EAA2E;AAC3E,0DAA0D;AAC1D,wFAAwF;AACxF,sFAAsF;AACtF,qFAAqF;AACrF,uFAAuF;AACvF,yFAAyF;AACzF,gEAAgE;AAChE,0FAA0F;AAC1F,qFAAqF;AACrF,0FAA0F;AAC1F,uFAAuF;AACvF,yFAAyF;AACzF,kEAAkE;AAClE,EAAE;AACF,gFAAgF;AAChF,qFAAqF;AACrF,qFAAqF;AACrF,qFAAqF;AACrF,2EAA2E;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;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awD,CAAC;AAE1F,kFAAkF;AAElF;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAe;IAC5C,OAAO,GAAG,KAAK,CAAC,WAAW,OAAO,KAAK,CAAC,IAAI,IAAI,CAAC;AACnD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,0BAA0B,GACrC,uFAAuF;IACvF,uFAAuF;IACvF,sFAAsF;IACtF,0EAA0E,CAAC;AAE7E;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAA4B,MAAM;IACjE,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"}
|
package/dist/commands/context.js
CHANGED
|
@@ -150,6 +150,19 @@ function statusTag(status, closed) {
|
|
|
150
150
|
function intentTldr(intent) {
|
|
151
151
|
return intent.outcome_tldr ?? intent.design_tldr ?? intent.plan_tldr;
|
|
152
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* A TL;DR line under a handle, indented, respecting multiple lines verbatim (design
|
|
155
|
+
* IN-wazu8k Key decisions: "slim and context return the whole list, no truncation, no
|
|
156
|
+
* cap in the CLI either"). `TldrParser::extract()` now returns the full outcomes list
|
|
157
|
+
* (or a `# Summary` paragraph) joined by `\n` rather than a single collapsed line, so
|
|
158
|
+
* every line of a multi-line TL;DR prints, each at the same indent.
|
|
159
|
+
*/
|
|
160
|
+
function printIndentedTldr(tldr, indent) {
|
|
161
|
+
if (!tldr)
|
|
162
|
+
return;
|
|
163
|
+
for (const line of tldr.split('\n'))
|
|
164
|
+
console.log(`${indent}${line}`);
|
|
165
|
+
}
|
|
153
166
|
function printMissions(missions) {
|
|
154
167
|
if (missions.length === 0)
|
|
155
168
|
return;
|
|
@@ -158,8 +171,7 @@ function printMissions(missions) {
|
|
|
158
171
|
// The active mission is the session's likeliest frame — marked so it reads first.
|
|
159
172
|
const marker = mission.status === 'active' ? '▸' : ' ';
|
|
160
173
|
console.log(` ${marker} ${mission.number} ${mission.name} ${statusTag(mission.status, CLOSED_MISSION_STATUSES)}`);
|
|
161
|
-
|
|
162
|
-
console.log(` ${mission.outcome_tldr}`);
|
|
174
|
+
printIndentedTldr(mission.outcome_tldr, ' ');
|
|
163
175
|
}
|
|
164
176
|
}
|
|
165
177
|
/**
|
|
@@ -176,9 +188,7 @@ function printIntents(intents, missions) {
|
|
|
176
188
|
printed.add(intent);
|
|
177
189
|
const areas = intent.areas.length > 0 ? ` (${intent.areas.join(', ')})` : '';
|
|
178
190
|
console.log(`${indent}${intent.number} ${intent.name} ${statusTag(intent.status, CLOSED_INTENT_STATUSES)}${areas}`);
|
|
179
|
-
|
|
180
|
-
if (tldr)
|
|
181
|
-
console.log(`${indent} ${tldr}`);
|
|
191
|
+
printIndentedTldr(intentTldr(intent), `${indent} `);
|
|
182
192
|
};
|
|
183
193
|
for (const mission of missions) {
|
|
184
194
|
const group = intents.filter((i) => i.mission === mission.number && !printed.has(i));
|