orbitmap 0.7.0 → 0.9.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/README.md +45 -10
- package/dist/adapters/cloud.d.ts +6 -3
- package/dist/adapters/cloud.js +59 -6
- package/dist/adapters/cloud.js.map +1 -1
- package/dist/adapters/local/adapter.d.ts +6 -3
- package/dist/adapters/local/adapter.js +9 -2
- package/dist/adapters/local/adapter.js.map +1 -1
- package/dist/adapters/types.d.ts +36 -2
- package/dist/agent-instructions.d.ts +25 -10
- package/dist/agent-instructions.js +143 -59
- 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/doc-errors.d.ts +43 -0
- package/dist/commands/doc-errors.js +77 -0
- package/dist/commands/doc-errors.js.map +1 -0
- package/dist/commands/doc-import.d.ts +9 -0
- package/dist/commands/doc-import.js +36 -3
- package/dist/commands/doc-import.js.map +1 -1
- package/dist/commands/doc-patch.d.ts +1 -3
- package/dist/commands/doc-patch.js +62 -21
- package/dist/commands/doc-patch.js.map +1 -1
- package/dist/commands/doc-share.d.ts +1 -0
- package/dist/commands/doc-share.js +17 -8
- package/dist/commands/doc-share.js.map +1 -1
- package/dist/commands/doc-update.js +20 -2
- package/dist/commands/doc-update.js.map +1 -1
- package/dist/commands/init.js +0 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/intent.js +42 -6
- package/dist/commands/intent.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/index.js +27 -10
- package/dist/index.js.map +1 -1
- package/dist/list-options.d.ts +33 -0
- package/dist/list-options.js +55 -0
- package/dist/list-options.js.map +1 -1
- package/dist/write-target.d.ts +15 -4
- package/dist/write-target.js +2 -1
- package/dist/write-target.js.map +1 -1
- package/package.json +1 -1
|
@@ -44,9 +44,12 @@ export declare const SKILL_BRAINSTORM_BODY: string;
|
|
|
44
44
|
export declare const SKILL_DESIGN_FRONTMATTER = "---\nname: orbitmap-design\ndescription: >\n Designing an intent's solution in OrbitMap \u2014 the second gate of the product-building\n flow (after brainstorm): turns an agreed outcome into an approach,\n technical spec, and UX (when there's UI), one question at a time, then writes the\n result to the intent's design field. Use for \"design this intent\", \"let's design X\", or\n an intent entering `design` status. Use it once the outcome is agreed; if the outcome is\n still missing or vague, step aside to `orbitmap-brainstorm` first. Requires the\n `orbitmap` core skill.\n---";
|
|
45
45
|
export declare const SKILL_DESIGN_BODY: string;
|
|
46
46
|
export declare const SKILL_DOCS_FRONTMATTER = "---\nname: orbitmap-docs\ndescription: >\n Reading and updating OrbitMap documents (specs, architecture, guides, decisions).\n Use when the user asks to read, import, or update project documentation tracked in\n OrbitMap. Requires the `orbitmap` core skill.\n---";
|
|
47
|
-
export declare const SKILL_DOCS_BODY = "# OrbitMap documents\n\nDocuments live at area or workspace level: `orbitmap docs` lists every document you can\nreach \u2014 your areas' documents plus the workspace-level ones \u2014 and their metadata (slug,\nwhen to use) already rides the context payload your session focus was matched from (see\nSession focus in the `orbitmap` skill \u2014 ensure, don't re-call).\n\n## Goal\nRead and update OrbitMap documents efficiently: pull only the context you need (TOC \u2192\nsection \u2192 full, never dump a whole doc into the conversation), and make every change\nthrough the CLI \u2014 never by editing the workspace files directly.\n\n**Interface:** every action below is an OrbitMap operation \u2014 run the `orbitmap` CLI command\nshown, or its equivalent MCP tool when this session uses MCP; `orbitmap <cmd> --help` and the\nMCP tool schemas are the authority. Never edit the workspace data files directly.\n\n## Choosing what to read\n`orbitmap docs` lists documents with their `context` (when the doc is relevant) and\n`sections_count`. Use context to pick the right document; use sections_count to decide\nwhether to fetch the TOC first (many sections) or go straight to full.\n\n## Token-efficient reading flow\n1. `orbitmap doc <slug>` \u2192 context + table of contents (cheap).\n2. `orbitmap doc <slug> --section \"## Auth\"` \u2192 just that section.\n3. `orbitmap doc <slug> --full` \u2192 full content (expensive \u2014 last resort).\nUse the lightest mode that answers your question. When the CLI reports a local file path\nfor the full content, read that file instead of printing the content into the\nconversation.\n\n## Editing\n- Import a new document: `orbitmap doc-import <title> --file <file.md> --type\n spec|architecture|api|guide|decision|changelog|other [--context \"\u2026\"]`.
|
|
47
|
+
export declare const SKILL_DOCS_BODY = "# OrbitMap documents\n\nDocuments live at area or workspace level: `orbitmap docs` lists every document you can\nreach \u2014 your areas' documents plus the workspace-level ones \u2014 and their metadata (slug,\nwhen to use) already rides the context payload your session focus was matched from (see\nSession focus in the `orbitmap` skill \u2014 ensure, don't re-call).\n\n## Goal\nRead and update OrbitMap documents efficiently: pull only the context you need (TOC \u2192\nsection \u2192 full, never dump a whole doc into the conversation), and make every change\nthrough the CLI \u2014 never by editing the workspace files directly.\n\n**Interface:** every action below is an OrbitMap operation \u2014 run the `orbitmap` CLI command\nshown, or its equivalent MCP tool when this session uses MCP; `orbitmap <cmd> --help` and the\nMCP tool schemas are the authority. Never edit the workspace data files directly.\n\n## Choosing what to read\n`orbitmap docs` lists documents with their `context` (when the doc is relevant) and\n`sections_count`. Use context to pick the right document; use sections_count to decide\nwhether to fetch the TOC first (many sections) or go straight to full.\n\n## Token-efficient reading flow\n1. `orbitmap doc <slug>` \u2192 context + table of contents (cheap).\n2. `orbitmap doc <slug> --section \"## Auth\"` \u2192 just that section.\n3. `orbitmap doc <slug> --full` \u2192 full content (expensive \u2014 last resort).\nUse the lightest mode that answers your question. When the CLI reports a local file path\nfor the full content, read that file instead of printing the content into the\nconversation.\n\n## Editing\n- Import a new document: `orbitmap doc-import <title> --file <file.md> --type\n spec|architecture|api|guide|decision|changelog|other [--context \"\u2026\"]`. A document\n belongs to a workspace and is linked to any number of areas; zero links means workspace\n scope. It lands area-level by default, resolved from the current directory; pass\n `--scope workspace` to link it to no area instead (`--workspace-id` says only WHICH\n workspace).\n- Update: `orbitmap doc-update <slug> --file <file.md>` (replaces content, bumps\n version).\n- To change an OrbitMap document, ALWAYS go through these commands \u2014 NEVER edit files\n inside the OrbitMap workspace/cache directories directly.\n\n## Editing safely \u2014 documents have NO revert\n- Section ops are the only ops (`doc-patch --replace-section/--insert-section/\n --delete-section/--append`); the line-based ones are gone. On a document with an\n unclosed code fence every patch op is REFUSED \u2014 repair it with a full `doc-update`.\n `doc-patch --dry-run` reports the boundaries each op would touch, without writing.\n- The section parser is fence-aware: a line-start `#` inside a code block is never a\n section boundary, and a patch whose result would leave an unclosed fence is refused.\n- After ANY write, re-read the changed section (or TOC for structure) and verify the\n result actually matches what you sent. A bumped version number is not proof.";
|
|
48
48
|
export interface SkillDef {
|
|
49
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Skill name = directory name under the agent's skills directory (`~/.claude/skills/`,
|
|
51
|
+
* `~/.codex/skills/`, or a project's `.claude/skills/`).
|
|
52
|
+
*/
|
|
50
53
|
name: string;
|
|
51
54
|
/** Verbatim YAML frontmatter block, including the `---` fences. */
|
|
52
55
|
frontmatter: string;
|
|
@@ -55,7 +58,7 @@ export interface SkillDef {
|
|
|
55
58
|
/**
|
|
56
59
|
* Extra files shipped with the skill (a skill = SKILL.md + optional reference
|
|
57
60
|
* files). Key = POSIX path RELATIVE to the skill's directory
|
|
58
|
-
* (
|
|
61
|
+
* (`<skills dir>/<name>/`), and may contain subdirectories, e.g.
|
|
59
62
|
* `references/worker-contract.md`. Value = verbatim file content (no trailing
|
|
60
63
|
* newline; the installer appends one, matching buildSkillFile).
|
|
61
64
|
*
|
|
@@ -67,27 +70,39 @@ export interface SkillDef {
|
|
|
67
70
|
references?: Readonly<Record<string, string>>;
|
|
68
71
|
}
|
|
69
72
|
export declare const SKILLS: readonly SkillDef[];
|
|
70
|
-
export declare const
|
|
73
|
+
export declare const THIN_HOOK_SKILLS = "## OrbitMap\n\nWork is tracked in OrbitMap via the `orbitmap` CLI. You work in a WORKSPACE, which can span\nseveral repositories: each repo is an AREA, while missions, intents and documents belong to\nthe workspace itself, not to any one repo.\nLoad the OrbitMap skills whenever the user wants to build, add, change or fix something, in\nwhatever words they use \u2014 do not wait for OrbitMap vocabulary. Load them too when they talk\nabout tracking work (backlog, tasks, missions, intents, ideas, issues, documents, planning).\nLoad the core skill 'orbitmap' first, before any other orbitmap-* skill \u2014 they all build on it.\nNothing gets built before it is framed: a feature, component or behaviour change gets an intent\n\u2014 outcome (brainstorm) \u2192 design \u2192 plan \u2192 build (execute), one gate at a time, written to the\nintent as you go. Small self-contained work (a typo, an obvious one-file fix) is just a task.\nNEVER finish a task, intent or mission without a final `orbitmap log` entry and a status update;\nthe final entry closes a record that already exists. Finished work defaults to `in_review`, not `done`.\nOrbitMap tool responses may carry an Instructions section \u2014 act on it before continuing.";
|
|
71
74
|
export declare const THIN_HOOK_GENERIC = "## OrbitMap\n\nWork is tracked in OrbitMap via the `orbitmap` CLI. You work in a WORKSPACE, which can span\nseveral repositories: each repo is an AREA, while missions, intents and documents belong to\nthe workspace itself, not to any one repo.\nFollow the sections below whenever the user wants to build, add, change or fix something, in\nwhatever words they use \u2014 do not wait for OrbitMap vocabulary. Follow them too when they talk\nabout tracking work (backlog, tasks, missions, intents, ideas, issues, documents, planning).\nNothing gets built before it is framed: a feature, component or behaviour change gets an intent\n\u2014 outcome (brainstorm) \u2192 design \u2192 plan \u2192 build (execute), one gate at a time, written to the\nintent as you go. Small self-contained work (a typo, an obvious one-file fix) is just a task.\nNEVER finish a task, intent or mission without a final `orbitmap log` entry and a status update;\nthe final entry closes a record that already exists. Finished work defaults to `in_review`, not `done`.\nOrbitMap tool responses may carry an Instructions section \u2014 act on it before continuing.";
|
|
72
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Build one SKILL.md file (frontmatter + body). The layout is the same for every
|
|
77
|
+
* skills-capable agent — Claude Code and Codex read identical frontmatter — so one
|
|
78
|
+
* renderer serves all of them.
|
|
79
|
+
*/
|
|
73
80
|
export declare function buildSkillFile(skill: SkillDef): string;
|
|
74
81
|
/**
|
|
75
|
-
* One extra line appended to the
|
|
82
|
+
* One extra line appended to the thin hook when the skills were installed at PROJECT
|
|
76
83
|
* scope. `CLAUDE.md` is inherited by every sub-directory, but a project-level
|
|
77
84
|
* `.claude/skills/` directory is not: a session started in a sibling or child repository
|
|
78
85
|
* reads this hook and cannot load the skills it names. The hook must therefore say where
|
|
79
86
|
* the skills actually are, and how to make them visible everywhere. At user scope the
|
|
80
87
|
* skills are visible wherever the hook is, so no caveat is needed.
|
|
88
|
+
*
|
|
89
|
+
* It names `.claude/skills/` because Claude Code is the only agent that can reach it:
|
|
90
|
+
* project scope installs skills only for an agent that READS them at project scope, and
|
|
91
|
+
* Codex — the other skills-capable agent — discovers skills under `$CODEX_HOME` only.
|
|
81
92
|
*/
|
|
82
93
|
export declare const SKILL_SCOPE_CAVEAT_PROJECT: string;
|
|
83
94
|
/**
|
|
84
|
-
* Build the thin always-on block for
|
|
95
|
+
* Build the thin always-on block for ANY skills-capable agent's config file — `CLAUDE.md`
|
|
96
|
+
* for Claude Code, `AGENTS.md` for Codex. Both get the same block, because both load the
|
|
97
|
+
* skills the block points at; the file it lands in is the installer's business, not this
|
|
98
|
+
* function's.
|
|
99
|
+
*
|
|
85
100
|
* `scope` is where the accompanying skill files were installed — see
|
|
86
101
|
* {@link SKILL_SCOPE_CAVEAT_PROJECT}.
|
|
87
102
|
*/
|
|
88
|
-
export declare function
|
|
103
|
+
export declare function buildSkillsBlock(scope?: 'user' | 'project'): string;
|
|
89
104
|
/**
|
|
90
|
-
* Build the markdown fallback block for
|
|
91
|
-
* skill body inlined
|
|
105
|
+
* Build the markdown fallback block for agents with no skill ecosystem: the thin hook plus
|
|
106
|
+
* every skill body inlined, because there is nothing to load on demand.
|
|
92
107
|
*/
|
|
93
108
|
export declare function buildGenericBlock(): string;
|
|
@@ -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
|
|
@@ -444,7 +446,7 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
|
|
|
444
446
|
\`blocked\` with a logged blocker — an \`in_progress\` task means a fold step was
|
|
445
447
|
skipped; fix it before moving on. Then end the run:
|
|
446
448
|
\`orbitmap intent update IN-x --status in_review --log <entries>\` — the transition's
|
|
447
|
-
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.
|
|
448
450
|
Merging and closing to \`done\` are the USER'S. The merge EVENT — whoever performs
|
|
449
451
|
it — is what later flips the tasks to \`--delivery merged\`.
|
|
450
452
|
|
|
@@ -788,9 +790,9 @@ ${worklogKeepDropTest(' ')}
|
|
|
788
790
|
add or fix tasks and re-check. Do NOT proceed while a gap remains.
|
|
789
791
|
7. Write cross-task PLANNING NOTES + a short SUMMARY to the intent \`plan\` field —
|
|
790
792
|
\`orbitmap intent update IN-x --plan "<notes>"\`: decisions valid for all tasks,
|
|
791
|
-
sequencing rationale, and the coverage argument.
|
|
792
|
-
paragraph
|
|
793
|
-
|
|
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.
|
|
794
796
|
This REPLACES any seed notes that were in the field — you have already absorbed them.
|
|
795
797
|
8. Ensure a final DOC-UPDATE task exists: after the implementation is done and all tests
|
|
796
798
|
are green, update the OrbitMap documentation (see the \`orbitmap-docs\` skill).
|
|
@@ -1007,6 +1009,57 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
|
|
|
1007
1009
|
validation) into the design notes, never into the agreed outcome. Do not slip into
|
|
1008
1010
|
solutioning.
|
|
1009
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
|
+
|
|
1010
1063
|
## Flow
|
|
1011
1064
|
1. Gather context.
|
|
1012
1065
|
- Ensure session focus (see Session focus in the \`orbitmap\` skill): a valid focus
|
|
@@ -1044,15 +1097,21 @@ ${worklogKeepDropTest(' ')}
|
|
|
1044
1097
|
- \`note\` is the CATCH-ALL — anything useful that is not \`code_change\` / \`decision\` /
|
|
1045
1098
|
\`blocker\` goes in as \`note\`, with \`--meta\` for unusual structure. There is deliberately
|
|
1046
1099
|
NO \`other\` type. NEVER write \`status_change\`: the server authors it on every transition.
|
|
1047
|
-
3.
|
|
1048
|
-
OUT of scope and how success will be
|
|
1049
|
-
|
|
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.
|
|
1050
1104
|
4. Persist (create or refine). Update an existing unprocessed intent, or create one:
|
|
1051
1105
|
\`orbitmap intent update IN-x --outcome "<agreed outcome>" [--design "<design notes>"] [--plan "<plan notes>"]\`
|
|
1052
1106
|
/ \`orbitmap intent create "<name>" --outcome "<agreed outcome>" [--design "…"] [--plan "…"]\`.
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
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.
|
|
1056
1115
|
Route the captured notes by type —
|
|
1057
1116
|
HOW / tech / UX → the **design** field; build-order / task ideas / execution risks → the
|
|
1058
1117
|
**plan** field (OPTIONAL — only if the conversation produced any). Mark the user's notes
|
|
@@ -1079,9 +1138,9 @@ digraph orbitmap_brainstorm {
|
|
|
1079
1138
|
"Clarify idea into an outcome, one question at a time" [shape=box];
|
|
1080
1139
|
"Log decisions passing the keep/drop test, as they land" [shape=box];
|
|
1081
1140
|
"Capture user opinions / context as notes" [shape=box];
|
|
1082
|
-
"
|
|
1083
|
-
"User
|
|
1084
|
-
"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];
|
|
1085
1144
|
"Route notes to design/plan fields by type (marked as the user's)" [shape=box];
|
|
1086
1145
|
"Promote referenced idea to used" [shape=box];
|
|
1087
1146
|
"Advance status new to design, with --log entries (refused if none)" [shape=box];
|
|
@@ -1090,11 +1149,11 @@ digraph orbitmap_brainstorm {
|
|
|
1090
1149
|
"Gather context: Orb (intents / idea) + repo (files, docs, commits)" -> "Clarify idea into an outcome, one question at a time";
|
|
1091
1150
|
"Clarify idea into an outcome, one question at a time" -> "Log decisions passing the keep/drop test, as they land";
|
|
1092
1151
|
"Log decisions passing the keep/drop test, as they land" -> "Capture user opinions / context as notes";
|
|
1093
|
-
"Capture user opinions / context as notes" -> "
|
|
1094
|
-
"
|
|
1095
|
-
"User
|
|
1096
|
-
"User
|
|
1097
|
-
"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)";
|
|
1098
1157
|
"Route notes to design/plan fields by type (marked as the user's)" -> "Promote referenced idea to used";
|
|
1099
1158
|
"Promote referenced idea to used" -> "Advance status new to design, with --log entries (refused if none)";
|
|
1100
1159
|
"Advance status new to design, with --log entries (refused if none)" -> "Offer orbitmap-design (review or design?)";
|
|
@@ -1104,7 +1163,9 @@ digraph orbitmap_brainstorm {
|
|
|
1104
1163
|
## After the outcome
|
|
1105
1164
|
Before handing off, review the agreed outcome with fresh eyes:
|
|
1106
1165
|
- **Vague or assumed?** Is it concrete and in the user's words, or did you fill gaps? Fix.
|
|
1107
|
-
- **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.
|
|
1108
1169
|
- **Too big?** If it needs several independent designs, decompose into sibling intents and
|
|
1109
1170
|
frame the first — do not hand design an outcome that is really three outcomes.
|
|
1110
1171
|
Then write it (Flow step 4), advance \`new → design\`, and hand the baton to
|
|
@@ -1128,8 +1189,10 @@ Then write it (Flow step 4), advance \`new → design\`, and hand the baton to
|
|
|
1128
1189
|
- Create-or-refine: reuse an existing unprocessed intent instead of creating a duplicate.
|
|
1129
1190
|
- Ground the outcome in verified repo/tracker reality, not the plan doc or a stated claim —
|
|
1130
1191
|
check it is still needed and still undone before framing.
|
|
1131
|
-
- Keep the outcome WHAT/WHY:
|
|
1132
|
-
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.
|
|
1133
1196
|
- If the intent already has an agreed outcome (status \`design\` or later), step aside and
|
|
1134
1197
|
point at \`orbitmap-design\` — do not re-frame a settled outcome.
|
|
1135
1198
|
- Never auto-chain into designing after framing — always ask first.`;
|
|
@@ -1176,6 +1239,11 @@ holds a real design doc instead of raw notes, treat it as existing design to ref
|
|
|
1176
1239
|
## Key principles
|
|
1177
1240
|
- **Serve the outcome.** Every question and every section traces back to the outcome; if
|
|
1178
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.
|
|
1179
1247
|
- **One question at a time.** Refine by dialogue, never a questionnaire dump.
|
|
1180
1248
|
- **Prefer multiple choice — open questions are a LAST RESORT.** When a question's options
|
|
1181
1249
|
can be enumerated, ALWAYS offer them as a multiple choice with a recommended default; ask
|
|
@@ -1276,9 +1344,9 @@ ${worklogKeepDropTest(' ')}
|
|
|
1276
1344
|
5. Present the draft in sections scaled to their complexity (a few sentences when simple,
|
|
1277
1345
|
more when nuanced); after each section ask whether it looks right, and get the user's
|
|
1278
1346
|
approval before writing anything.
|
|
1279
|
-
6. Write it: \`orbitmap intent update IN-x --design "<doc>"\`.
|
|
1280
|
-
|
|
1281
|
-
|
|
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.
|
|
1282
1350
|
This REPLACES any framing
|
|
1283
1351
|
notes that were in the field — you have already absorbed them into the doc. When the
|
|
1284
1352
|
spec names the repos the build will touch, declare them on the intent in the same
|
|
@@ -1410,23 +1478,23 @@ conversation.
|
|
|
1410
1478
|
|
|
1411
1479
|
## Editing
|
|
1412
1480
|
- Import a new document: \`orbitmap doc-import <title> --file <file.md> --type
|
|
1413
|
-
spec|architecture|api|guide|decision|changelog|other [--context "…"]\`.
|
|
1414
|
-
|
|
1415
|
-
|
|
1481
|
+
spec|architecture|api|guide|decision|changelog|other [--context "…"]\`. A document
|
|
1482
|
+
belongs to a workspace and is linked to any number of areas; zero links means workspace
|
|
1483
|
+
scope. It lands area-level by default, resolved from the current directory; pass
|
|
1484
|
+
\`--scope workspace\` to link it to no area instead (\`--workspace-id\` says only WHICH
|
|
1485
|
+
workspace).
|
|
1416
1486
|
- Update: \`orbitmap doc-update <slug> --file <file.md>\` (replaces content, bumps
|
|
1417
1487
|
version).
|
|
1418
1488
|
- To change an OrbitMap document, ALWAYS go through these commands — NEVER edit files
|
|
1419
1489
|
inside the OrbitMap workspace/cache directories directly.
|
|
1420
1490
|
|
|
1421
|
-
## Editing safely — documents have NO revert
|
|
1422
|
-
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
- Never read a document between a \`doc-update\` upload and its confirm — a cached read
|
|
1429
|
-
makes the confirm silently re-save the OLD content while still bumping the version.
|
|
1491
|
+
## Editing safely — documents have NO revert
|
|
1492
|
+
- Section ops are the only ops (\`doc-patch --replace-section/--insert-section/
|
|
1493
|
+
--delete-section/--append\`); the line-based ones are gone. On a document with an
|
|
1494
|
+
unclosed code fence every patch op is REFUSED — repair it with a full \`doc-update\`.
|
|
1495
|
+
\`doc-patch --dry-run\` reports the boundaries each op would touch, without writing.
|
|
1496
|
+
- The section parser is fence-aware: a line-start \`#\` inside a code block is never a
|
|
1497
|
+
section boundary, and a patch whose result would leave an unclosed fence is refused.
|
|
1430
1498
|
- After ANY write, re-read the changed section (or TOC for structure) and verify the
|
|
1431
1499
|
result actually matches what you sent. A bumped version number is not proof.`;
|
|
1432
1500
|
export const SKILLS = [
|
|
@@ -1463,8 +1531,12 @@ export const SKILLS = [
|
|
|
1463
1531
|
},
|
|
1464
1532
|
];
|
|
1465
1533
|
// ── The thin always-on hook (CLAUDE.md / AGENTS.md) ────────────────────────────
|
|
1466
|
-
//
|
|
1467
|
-
|
|
1534
|
+
// The hook for every agent that can LOAD skills — Claude Code and Codex today, whichever
|
|
1535
|
+
// agent gains a skills directory next. §8.2, verbatim (without the markers, which
|
|
1536
|
+
// buildSkillsBlock adds). It was written for Claude and used to be named after it, but
|
|
1537
|
+
// nothing in the text is Claude-specific: it only says WHEN to load the skills, and any
|
|
1538
|
+
// agent that discovers `<name>/SKILL.md` can act on it.
|
|
1539
|
+
export const THIN_HOOK_SKILLS = `## OrbitMap
|
|
1468
1540
|
|
|
1469
1541
|
Work is tracked in OrbitMap via the \`orbitmap\` CLI. You work in a WORKSPACE, which can span
|
|
1470
1542
|
several repositories: each repo is an AREA, while missions, intents and documents belong to
|
|
@@ -1479,8 +1551,8 @@ intent as you go. Small self-contained work (a typo, an obvious one-file fix) is
|
|
|
1479
1551
|
NEVER finish a task, intent or mission without a final \`orbitmap log\` entry and a status update;
|
|
1480
1552
|
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.
|
|
1481
1553
|
OrbitMap tool responses may carry an Instructions section — act on it before continuing.`;
|
|
1482
|
-
//
|
|
1483
|
-
//
|
|
1554
|
+
// The variant for agents with NO skill ecosystem: same rules, but it points at the
|
|
1555
|
+
// inlined sections below, because there are no skill files for these agents to load.
|
|
1484
1556
|
export const THIN_HOOK_GENERIC = `## OrbitMap
|
|
1485
1557
|
|
|
1486
1558
|
Work is tracked in OrbitMap via the \`orbitmap\` CLI. You work in a WORKSPACE, which can span
|
|
@@ -1496,34 +1568,46 @@ NEVER finish a task, intent or mission without a final \`orbitmap log\` entry an
|
|
|
1496
1568
|
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.
|
|
1497
1569
|
OrbitMap tool responses may carry an Instructions section — act on it before continuing.`;
|
|
1498
1570
|
// ── Assembly helpers ───────────────────────────────────────────────────────────
|
|
1499
|
-
/**
|
|
1571
|
+
/**
|
|
1572
|
+
* Build one SKILL.md file (frontmatter + body). The layout is the same for every
|
|
1573
|
+
* skills-capable agent — Claude Code and Codex read identical frontmatter — so one
|
|
1574
|
+
* renderer serves all of them.
|
|
1575
|
+
*/
|
|
1500
1576
|
export function buildSkillFile(skill) {
|
|
1501
1577
|
return `${skill.frontmatter}\n\n${skill.body}\n`;
|
|
1502
1578
|
}
|
|
1503
1579
|
/**
|
|
1504
|
-
* One extra line appended to the
|
|
1580
|
+
* One extra line appended to the thin hook when the skills were installed at PROJECT
|
|
1505
1581
|
* scope. `CLAUDE.md` is inherited by every sub-directory, but a project-level
|
|
1506
1582
|
* `.claude/skills/` directory is not: a session started in a sibling or child repository
|
|
1507
1583
|
* reads this hook and cannot load the skills it names. The hook must therefore say where
|
|
1508
1584
|
* the skills actually are, and how to make them visible everywhere. At user scope the
|
|
1509
1585
|
* skills are visible wherever the hook is, so no caveat is needed.
|
|
1586
|
+
*
|
|
1587
|
+
* It names `.claude/skills/` because Claude Code is the only agent that can reach it:
|
|
1588
|
+
* project scope installs skills only for an agent that READS them at project scope, and
|
|
1589
|
+
* Codex — the other skills-capable agent — discovers skills under `$CODEX_HOME` only.
|
|
1510
1590
|
*/
|
|
1511
1591
|
export const SKILL_SCOPE_CAVEAT_PROJECT = 'These skills are installed at PROJECT scope, in this directory\'s `.claude/skills/`. ' +
|
|
1512
1592
|
'If you cannot load them (e.g. this session started in a different directory), do not ' +
|
|
1513
1593
|
'guess the workflow — ask the user to run `orbitmap setup-agent --scope user`, which ' +
|
|
1514
1594
|
'installs them into `~/.claude/skills/` where every session can see them.';
|
|
1515
1595
|
/**
|
|
1516
|
-
* Build the thin always-on block for
|
|
1596
|
+
* Build the thin always-on block for ANY skills-capable agent's config file — `CLAUDE.md`
|
|
1597
|
+
* for Claude Code, `AGENTS.md` for Codex. Both get the same block, because both load the
|
|
1598
|
+
* skills the block points at; the file it lands in is the installer's business, not this
|
|
1599
|
+
* function's.
|
|
1600
|
+
*
|
|
1517
1601
|
* `scope` is where the accompanying skill files were installed — see
|
|
1518
1602
|
* {@link SKILL_SCOPE_CAVEAT_PROJECT}.
|
|
1519
1603
|
*/
|
|
1520
|
-
export function
|
|
1521
|
-
const body = scope === 'project' ? `${
|
|
1604
|
+
export function buildSkillsBlock(scope = 'user') {
|
|
1605
|
+
const body = scope === 'project' ? `${THIN_HOOK_SKILLS}\n${SKILL_SCOPE_CAVEAT_PROJECT}` : THIN_HOOK_SKILLS;
|
|
1522
1606
|
return `${MARKER_START}\n${body}\n${MARKER_END}`;
|
|
1523
1607
|
}
|
|
1524
1608
|
/**
|
|
1525
|
-
* Build the markdown fallback block for
|
|
1526
|
-
* skill body inlined
|
|
1609
|
+
* Build the markdown fallback block for agents with no skill ecosystem: the thin hook plus
|
|
1610
|
+
* every skill body inlined, because there is nothing to load on demand.
|
|
1527
1611
|
*/
|
|
1528
1612
|
export function buildGenericBlock() {
|
|
1529
1613
|
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;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G,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));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GAKxB,MAAM,yBAAyB,CAAC;AAsHjC,yFAAyF;AACzF,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAE9D,2CAA2C;AAC3C,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,KAAK,UAAU,0BAA0B,CACvC,aAAqB;IAErB,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,aAAa,EAAE,CAAC;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C;AAED,SAAS,cAAc,CAAC,SAA4B;IAClD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEnC,OAAO,CAAC,GAAG,CAAC,iBAAiB,SAAS,CAAC,MAAM,sCAAsC,CAAC,CAAC;IACrF,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpE,OAAO,CAAC,GAAG,CACT,KAAK,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC/E,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,SAA2B;IAClD,IAAI,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI;QAAE,OAAO,GAAG,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,GAAG,CAAC;IACrF,OAAO,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,IAAI,gBAAgB,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document surface's refusal vocabulary, in ONE place (IN-jnz64x / S10).
|
|
3
|
+
*
|
|
4
|
+
* Every document command can now be refused for a reason that is about *scope* rather than
|
|
5
|
+
* about the reference the caller typed: the document exists, but it lives at a scope the
|
|
6
|
+
* caller did not address, or in an area the caller cannot write to. The intent's binding
|
|
7
|
+
* decision is that such a refusal must name the real cause — "wrong slug" was exactly the
|
|
8
|
+
* lie that made IS-fzczuw and IS-2psuq5 undiagnosable — so the wire codes are translated
|
|
9
|
+
* once, here, instead of once per command file.
|
|
10
|
+
*
|
|
11
|
+
* The map was born inside `doc-patch.ts`; the patch-only entries stay there and are merged
|
|
12
|
+
* on top of these by {@link printDocumentError}'s caller.
|
|
13
|
+
*/
|
|
14
|
+
import { OrbitMapAPIError } from '../errors.js';
|
|
15
|
+
/**
|
|
16
|
+
* A write the server acknowledged as NOT having happened (`updated: false` / `imported:
|
|
17
|
+
* false` in an otherwise successful envelope).
|
|
18
|
+
*
|
|
19
|
+
* It is not a server error code: a server that knows a write failed answers
|
|
20
|
+
* `STORAGE_WRITE_FAILED` 503. This code exists for the contract violation in between — a
|
|
21
|
+
* 2xx whose own acknowledgement says the write did not land. Reporting success off the
|
|
22
|
+
* version number alone (what the CLI did before) is the one outcome that must not survive.
|
|
23
|
+
*/
|
|
24
|
+
export declare const WRITE_NOT_ACKNOWLEDGED = "WRITE_NOT_ACKNOWLEDGED";
|
|
25
|
+
/** Friendly text for the server codes the document commands can be refused with. */
|
|
26
|
+
export declare const DOCUMENT_FRIENDLY_ERRORS: Record<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Print an error, replacing the server's text with the friendly one when we have it.
|
|
29
|
+
*
|
|
30
|
+
* The lookup goes through the CANONICAL code (`ERROR_CODE_ALIASES` in `errors.ts`) while
|
|
31
|
+
* the reported code stays the wire one, so nothing a user sees changes across the API's
|
|
32
|
+
* `PROJECT_*` → `AREA_*` rename. Exit code is the caller's business — every command sets
|
|
33
|
+
* `process.exitCode = 1` in its catch, as it always did.
|
|
34
|
+
*
|
|
35
|
+
* @param extra Command-specific entries (e.g. `doc-patch`'s), merged over the shared map.
|
|
36
|
+
*/
|
|
37
|
+
export declare function printDocumentError(error: unknown, jsonMode: boolean, extra?: Record<string, string>): void;
|
|
38
|
+
/**
|
|
39
|
+
* The error a command raises when the server's own acknowledgement says the write did not
|
|
40
|
+
* land. `subject` is what the user typed (title or reference), so the message names the
|
|
41
|
+
* thing that was NOT written.
|
|
42
|
+
*/
|
|
43
|
+
export declare function writeNotAcknowledged(operation: string, subject: string, details?: Record<string, unknown>): OrbitMapAPIError;
|