orbitmap 0.3.0 → 0.4.1
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 +546 -212
- package/dist/adapters/cloud.d.ts +367 -0
- package/dist/adapters/cloud.js +582 -0
- package/dist/adapters/cloud.js.map +1 -0
- package/dist/adapters/factory.d.ts +15 -0
- package/dist/adapters/factory.js +31 -0
- package/dist/adapters/factory.js.map +1 -0
- package/dist/adapters/local/adapter.d.ts +351 -0
- package/dist/adapters/local/adapter.js +346 -0
- package/dist/adapters/local/adapter.js.map +1 -0
- package/dist/adapters/local/context.d.ts +112 -0
- package/dist/adapters/local/context.js +137 -0
- package/dist/adapters/local/context.js.map +1 -0
- package/dist/adapters/local/entities/documents.d.ts +85 -0
- package/dist/adapters/local/entities/documents.js +251 -0
- package/dist/adapters/local/entities/documents.js.map +1 -0
- package/dist/adapters/local/entities/planning.d.ts +108 -0
- package/dist/adapters/local/entities/planning.js +540 -0
- package/dist/adapters/local/entities/planning.js.map +1 -0
- package/dist/adapters/local/entities/tasks.d.ts +95 -0
- package/dist/adapters/local/entities/tasks.js +442 -0
- package/dist/adapters/local/entities/tasks.js.map +1 -0
- package/dist/adapters/local/entities/work-items.d.ts +110 -0
- package/dist/adapters/local/entities/work-items.js +623 -0
- package/dist/adapters/local/entities/work-items.js.map +1 -0
- package/dist/adapters/local/rules.d.ts +172 -0
- package/dist/adapters/local/rules.js +319 -0
- package/dist/adapters/local/rules.js.map +1 -0
- package/dist/adapters/local/shapes.d.ts +209 -0
- package/dist/adapters/local/shapes.js +558 -0
- package/dist/adapters/local/shapes.js.map +1 -0
- package/dist/adapters/local/store.d.ts +200 -0
- package/dist/adapters/local/store.js +665 -0
- package/dist/adapters/local/store.js.map +1 -0
- package/dist/adapters/local/types.d.ts +226 -0
- package/dist/adapters/local/types.js +41 -0
- package/dist/adapters/local/types.js.map +1 -0
- package/dist/adapters/types.d.ts +332 -0
- package/dist/adapters/types.js +2 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/agent-instructions.d.ts +25 -9
- package/dist/agent-instructions.js +285 -237
- package/dist/agent-instructions.js.map +1 -1
- package/dist/api-client.d.ts +8 -239
- package/dist/api-client.js +8 -403
- package/dist/api-client.js.map +1 -1
- package/dist/commands/agents.d.ts +1 -1
- package/dist/commands/agents.js +10 -10
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/areas.d.ts +3 -0
- package/dist/commands/areas.js +29 -0
- package/dist/commands/areas.js.map +1 -0
- package/dist/commands/assign.d.ts +3 -2
- package/dist/commands/assign.js +52 -15
- package/dist/commands/assign.js.map +1 -1
- package/dist/commands/context.d.ts +1 -1
- package/dist/commands/context.js +18 -12
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/create-area.d.ts +7 -0
- package/dist/commands/create-area.js +29 -0
- package/dist/commands/create-area.js.map +1 -0
- package/dist/commands/create.d.ts +3 -1
- package/dist/commands/create.js +5 -8
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/dep.d.ts +2 -2
- package/dist/commands/dep.js +3 -3
- package/dist/commands/dep.js.map +1 -1
- package/dist/commands/doc-import.d.ts +1 -1
- package/dist/commands/doc-import.js +2 -2
- package/dist/commands/doc-import.js.map +1 -1
- package/dist/commands/doc-patch.d.ts +1 -1
- package/dist/commands/doc-patch.js +2 -2
- package/dist/commands/doc-patch.js.map +1 -1
- package/dist/commands/doc-share.d.ts +6 -6
- package/dist/commands/doc-share.js +13 -13
- package/dist/commands/doc-share.js.map +1 -1
- package/dist/commands/doc-update.d.ts +1 -1
- package/dist/commands/doc-update.js +2 -2
- package/dist/commands/doc-update.js.map +1 -1
- package/dist/commands/doc.d.ts +1 -1
- package/dist/commands/doc.js +5 -4
- package/dist/commands/doc.js.map +1 -1
- package/dist/commands/docs-cache.d.ts +2 -2
- package/dist/commands/docs-cache.js +3 -3
- package/dist/commands/docs-cache.js.map +1 -1
- package/dist/commands/docs.d.ts +1 -1
- package/dist/commands/docs.js +2 -2
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/get.d.ts +1 -1
- package/dist/commands/get.js +43 -3
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/ideas.d.ts +4 -4
- package/dist/commands/ideas.js +6 -11
- package/dist/commands/ideas.js.map +1 -1
- package/dist/commands/init.d.ts +45 -3
- package/dist/commands/init.js +452 -104
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/intent.d.ts +41 -0
- package/dist/commands/intent.js +237 -0
- package/dist/commands/intent.js.map +1 -0
- package/dist/commands/issues.d.ts +6 -5
- package/dist/commands/issues.js +8 -12
- package/dist/commands/issues.js.map +1 -1
- package/dist/commands/log.d.ts +1 -1
- package/dist/commands/log.js +2 -2
- package/dist/commands/log.js.map +1 -1
- package/dist/commands/mission.d.ts +42 -0
- package/dist/commands/mission.js +219 -0
- package/dist/commands/mission.js.map +1 -0
- package/dist/commands/orbit.d.ts +40 -3
- package/dist/commands/orbit.js +231 -58
- package/dist/commands/orbit.js.map +1 -1
- package/dist/commands/overview.d.ts +2 -2
- package/dist/commands/overview.js +25 -28
- package/dist/commands/overview.js.map +1 -1
- package/dist/commands/setup-agent.d.ts +27 -0
- package/dist/commands/setup-agent.js +85 -30
- package/dist/commands/setup-agent.js.map +1 -1
- package/dist/commands/setup-mcp.d.ts +1 -1
- package/dist/commands/setup-mcp.js +20 -49
- package/dist/commands/setup-mcp.js.map +1 -1
- package/dist/commands/start.d.ts +1 -1
- package/dist/commands/start.js +2 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts +2 -1
- package/dist/commands/status.js +3 -3
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/subtask.d.ts +1 -1
- package/dist/commands/subtask.js +2 -2
- package/dist/commands/subtask.js.map +1 -1
- package/dist/commands/task-edit-content.d.ts +1 -1
- package/dist/commands/task-edit-content.js +2 -2
- package/dist/commands/task-edit-content.js.map +1 -1
- package/dist/commands/task.d.ts +10 -3
- package/dist/commands/task.js +19 -21
- package/dist/commands/task.js.map +1 -1
- package/dist/commands/tasks.d.ts +1 -1
- package/dist/commands/tasks.js +2 -2
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/vibes.d.ts +4 -4
- package/dist/commands/vibes.js +5 -5
- package/dist/commands/vibes.js.map +1 -1
- package/dist/config.d.ts +69 -9
- package/dist/config.js +206 -23
- package/dist/config.js.map +1 -1
- package/dist/doc-cache.d.ts +23 -3
- package/dist/doc-cache.js +72 -12
- package/dist/doc-cache.js.map +1 -1
- package/dist/errors.d.ts +19 -2
- package/dist/errors.js +35 -0
- package/dist/errors.js.map +1 -1
- package/dist/id-resolve.d.ts +61 -0
- package/dist/id-resolve.js +87 -0
- package/dist/id-resolve.js.map +1 -0
- package/dist/index.js +477 -104
- package/dist/index.js.map +1 -1
- package/dist/mcp-config.d.ts +36 -0
- package/dist/mcp-config.js +51 -0
- package/dist/mcp-config.js.map +1 -0
- package/dist/oauth.d.ts +8 -0
- package/dist/oauth.js +54 -15
- package/dist/oauth.js.map +1 -1
- package/dist/output.js +7 -2
- package/dist/output.js.map +1 -1
- package/dist/paths.d.ts +97 -0
- package/dist/paths.js +178 -0
- package/dist/paths.js.map +1 -0
- package/dist/project-config.d.ts +75 -0
- package/dist/project-config.js +55 -0
- package/dist/project-config.js.map +1 -0
- package/dist/workspace-resolve.d.ts +158 -0
- package/dist/workspace-resolve.js +284 -0
- package/dist/workspace-resolve.js.map +1 -0
- package/package.json +53 -50
|
@@ -5,282 +5,330 @@
|
|
|
5
5
|
// Equivalent of the MCP "system instructions" that are always
|
|
6
6
|
// in the system prompt. Guarantees the agent always knows the
|
|
7
7
|
// project uses OrbitMap and knows the workflow skeleton.
|
|
8
|
-
// 2.
|
|
9
|
-
// catalogue
|
|
10
|
-
//
|
|
11
|
-
// -
|
|
8
|
+
// 2. The four skills — the deep, on-demand layer. Equivalent of the MCP tool
|
|
9
|
+
// catalogue (INSTRUCTIONS_FULL), split by topic:
|
|
10
|
+
// orbitmap — object model, context, command map
|
|
11
|
+
// orbitmap-working — task lifecycle, logging, git/delivery
|
|
12
|
+
// orbitmap-planning — missions, intents, ideas, issues
|
|
13
|
+
// orbitmap-docs — documents
|
|
14
|
+
// Shipped two ways:
|
|
15
|
+
// - Claude: one `.claude/skills/<name>/SKILL.md` per skill,
|
|
12
16
|
// loaded on demand (zero per-turn context cost).
|
|
13
|
-
// - non-Claude:
|
|
14
|
-
//
|
|
17
|
+
// - non-Claude: all four bodies concatenated into the agent
|
|
18
|
+
// config file (no skill ecosystem to lean on).
|
|
15
19
|
//
|
|
16
|
-
//
|
|
17
|
-
// `
|
|
18
|
-
|
|
20
|
+
// The content below is normative: it is transcribed from §8 of
|
|
21
|
+
// `docs/local-mode-poc-spec.md`, which is itself the MCP oracle
|
|
22
|
+
// (`orbitmap-mcp/src/orbitmap_mcp/instructions.py`, INSTRUCTIONS_FULL) translated into
|
|
23
|
+
// CLI-command vocabulary. Do not paraphrase it; change the spec first.
|
|
19
24
|
export const MARKER_START = '<!-- ORBITMAP_START -->';
|
|
20
25
|
export const MARKER_END = '<!-- ORBITMAP_END -->';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
CLI equivalent of the OrbitMap MCP server's **full** profile: every command below maps
|
|
38
|
-
to an MCP tool. Add \`--json\` to any command for machine-readable output.
|
|
26
|
+
/** The core skill name (entry point). Kept for backwards compatibility. */
|
|
27
|
+
export const SKILL_NAME = 'orbitmap';
|
|
28
|
+
// ── Skill: orbitmap (core) — §8.3 ──────────────────────────────────────────────
|
|
29
|
+
export const SKILL_ORBITMAP_FRONTMATTER = `---
|
|
30
|
+
name: orbitmap
|
|
31
|
+
description: >
|
|
32
|
+
OrbitMap project management via the orbitmap CLI. Use when the user mentions OrbitMap,
|
|
33
|
+
orbit, tasks, backlog, missions, intents, ideas, issues, vibes, or asks to track,
|
|
34
|
+
plan, or log work. Entry point: object model, context resolution, command reference.
|
|
35
|
+
---`;
|
|
36
|
+
export const SKILL_ORBITMAP_BODY = `# OrbitMap CLI — core
|
|
37
|
+
|
|
38
|
+
OrbitMap is an agentic project management platform. You interact with it exclusively
|
|
39
|
+
through the \`orbitmap\` CLI (run with \`npx orbitmap …\` if not on PATH). The CLI works
|
|
40
|
+
identically in cloud mode and local-files mode — never assume which one is active, and
|
|
41
|
+
never read or write the workspace's data files directly. The CLI is the only interface.
|
|
39
42
|
|
|
40
43
|
## General behaviour
|
|
41
44
|
- Always prioritise the user's direct request. If the user asks you to do something
|
|
42
|
-
(
|
|
43
|
-
- Only interact with OrbitMap
|
|
44
|
-
|
|
45
|
-
- When the user mentions
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
##
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
45
|
+
(read a file, write code, answer a question), handle that first.
|
|
46
|
+
- Only interact with OrbitMap when the user explicitly asks you to (e.g. "check my
|
|
47
|
+
tasks", "start a task", "what's on my backlog", "log this idea").
|
|
48
|
+
- When the user mentions OrbitMap, orbit, task, backlog, or project-management concepts
|
|
49
|
+
in the context of tracking work, use \`orbitmap\` commands to handle the request.
|
|
50
|
+
|
|
51
|
+
## Object model
|
|
52
|
+
- Workspace = team level. Area = repo-level scope (formerly Project) — tasks, vibes and
|
|
53
|
+
most issues live in an area. Mission (MS-) = time-boxed workspace focus; at most one
|
|
54
|
+
active. Intent (IN-) = workspace-level goal grouping tasks/issues. Idea (ID-) = future
|
|
55
|
+
possibility, not a problem. Issue (IS-) = problem/bug. Vibe (VB-) = ad-hoc work log
|
|
56
|
+
outside a task. Task (TS-) = unit of work.
|
|
57
|
+
- Entity numbers (TS-xxxxxx etc.) are accepted by every command that takes an id.
|
|
58
|
+
|
|
59
|
+
## Context
|
|
60
|
+
- Area resolves automatically (config/env). Override per call with \`--area <slug>\`.
|
|
61
|
+
- If a command fails asking for area context, run \`orbitmap areas\` to list areas, then
|
|
62
|
+
retry with \`--area\`.
|
|
63
|
+
- \`orbitmap context\` shows who you are, the workspace, and the active area. Run it when
|
|
64
|
+
unsure.
|
|
55
65
|
|
|
56
66
|
## Task statuses
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
when the user
|
|
67
|
+
backlog, todo, in_progress, in_review, review_changes, done, blocked.
|
|
68
|
+
\`orbitmap tasks\` defaults to todo,in_progress. Ask for others explicitly, e.g.
|
|
69
|
+
\`orbitmap tasks --status backlog\` when the user asks about the backlog.
|
|
70
|
+
|
|
71
|
+
## Command reference (all commands accept --json)
|
|
72
|
+
- Context: \`orbitmap context\`, \`orbitmap areas\`, \`orbitmap overview\`
|
|
73
|
+
- Tasks: \`orbitmap tasks [--status s1,s2]\`, \`orbitmap task TS-x\`, \`orbitmap get <ID>\`,
|
|
74
|
+
\`orbitmap start [TS-x]\`, \`orbitmap status TS-x <status> [--delivery <d>]\`,
|
|
75
|
+
\`orbitmap create "title" [--intent IN-x|--mission MS-x] [--priority p]\`,
|
|
76
|
+
\`orbitmap subtask TS-parent "title"\`, \`orbitmap assign TS-x [agent]\`,
|
|
77
|
+
\`orbitmap dep add|remove TS-a TS-b\`, \`orbitmap log TS-x "msg" --type <t>\`
|
|
78
|
+
- Issues: \`orbitmap issue register|list|show|status|resolve\`
|
|
79
|
+
- Ideas: \`orbitmap idea add|list|show|status\`
|
|
80
|
+
- Vibes: \`orbitmap vibe log|list|show\`
|
|
81
|
+
- Missions: \`orbitmap mission list|show|create|update|status|link|unlink\`
|
|
82
|
+
- Intents: \`orbitmap intent list|show|create|update|link|unlink\`
|
|
83
|
+
- Documents: \`orbitmap docs\`, \`orbitmap doc <slug> [--section "## H"|--full]\`,
|
|
84
|
+
\`orbitmap doc-import\`, \`orbitmap doc-update\`
|
|
85
|
+
|
|
86
|
+
## Error handling
|
|
87
|
+
- If OrbitMap is unreachable (network down / workspace directory unavailable), inform
|
|
88
|
+
the user and continue the primary work without logging. Do NOT retry failed orbitmap
|
|
89
|
+
calls in a loop — report the issue and proceed with the task.`;
|
|
90
|
+
// ── Skill: orbitmap-working — §8.4 ─────────────────────────────────────────────
|
|
91
|
+
export const SKILL_WORKING_FRONTMATTER = `---
|
|
92
|
+
name: orbitmap-working
|
|
93
|
+
description: >
|
|
94
|
+
Working on OrbitMap tasks: starting/resuming, logging work, decisions and blockers,
|
|
95
|
+
finishing with the correct status, git branches and delivery status. Use whenever
|
|
96
|
+
implementing, resuming, or finishing a tracked task.
|
|
97
|
+
---`;
|
|
98
|
+
export const SKILL_WORKING_BODY = `# Working on OrbitMap tasks
|
|
60
99
|
|
|
61
100
|
## Task workflow (on user request)
|
|
62
101
|
When the user asks you to work on tasks:
|
|
63
102
|
1. \`orbitmap tasks --status in_progress\` — check for unfinished work.
|
|
64
|
-
2. If found → \`orbitmap task
|
|
65
|
-
3. If not → \`orbitmap start\` — auto-picks the first todo task,
|
|
103
|
+
2. If found → \`orbitmap task TS-x\` → read the work log → resume from the resume point.
|
|
104
|
+
3. If not → \`orbitmap start\` — auto-picks the first todo task, sets it in_progress and
|
|
105
|
+
prints full context (description, agent_instructions, logs).
|
|
66
106
|
4. If no tasks → inform the user.
|
|
107
|
+
Use \`orbitmap start TS-x\` to begin a specific task; \`orbitmap task TS-x\` only inspects.
|
|
67
108
|
|
|
68
|
-
|
|
109
|
+
## Rules
|
|
110
|
+
- Work on ONE task at a time.
|
|
111
|
+
- Always read agent_instructions from the task before implementing. Task-level
|
|
112
|
+
agent_instructions take precedence over area-level instructions.
|
|
113
|
+
- Only work on subtasks assigned to you; do not pick up other agents' subtasks.
|
|
114
|
+
- Do NOT mark a parent task done while it has unfinished subtasks, unless the user
|
|
115
|
+
explicitly asks.
|
|
69
116
|
|
|
70
117
|
## Logging
|
|
71
|
-
- \`orbitmap log
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
- \`orbitmap idea add
|
|
76
|
-
|
|
77
|
-
- To convert an idea into work: \`orbitmap create <title>\` → \`orbitmap idea status <id> --status used\`.
|
|
78
|
-
- When starting to investigate an issue: \`orbitmap issue status <id> investigating\`.
|
|
118
|
+
- \`orbitmap log TS-x "…" --type note|code_change|decision|blocker\` — work WITHIN a task.
|
|
119
|
+
- \`orbitmap vibe log "…" --type discovery|exploration|fix\` — ad-hoc work outside a task.
|
|
120
|
+
- Use \`--type decision\` when you pick between approaches, reject an alternative, or lock
|
|
121
|
+
in a non-obvious assumption — record the choice AND the why, not just the outcome.
|
|
122
|
+
- \`orbitmap idea add\` — future possibilities, NOT problems (problems →
|
|
123
|
+
\`orbitmap issue register\`).
|
|
79
124
|
- Keep log content concrete, concise, and useful for someone resuming work later.
|
|
80
125
|
|
|
81
|
-
## End of session or task
|
|
82
|
-
- Task finished →
|
|
83
|
-
\`orbitmap log
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
126
|
+
## End of session or task — MANDATORY
|
|
127
|
+
- Task finished → default to **in_review** so a human verifies before closing:
|
|
128
|
+
\`orbitmap log TS-x "Ready for review: …" --type note\` then
|
|
129
|
+
\`orbitmap status TS-x in_review\`.
|
|
130
|
+
- Task finished AND the user's prompt or the task's agent_instructions explicitly say to
|
|
131
|
+
close without review → \`orbitmap log TS-x "Summary: …" --type note\` then
|
|
132
|
+
\`orbitmap status TS-x done\`.
|
|
133
|
+
- Blocked by an external dependency you cannot resolve (waiting on another task, missing
|
|
134
|
+
access/credentials, unclear requirements, failing external service) →
|
|
135
|
+
\`orbitmap log TS-x "Blocked: <reason>" --type blocker\` then
|
|
136
|
+
\`orbitmap status TS-x blocked\`.
|
|
137
|
+
- Session ending, task not done but NOT blocked → \`orbitmap log TS-x "Resume point: …"
|
|
138
|
+
--type note\` — leave status in_progress.
|
|
91
139
|
- NEVER leave a task without a final log entry.
|
|
92
140
|
|
|
93
141
|
### Status decision guide
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
-
|
|
142
|
+
- **in_review**: work is finished. THE DEFAULT for completed work. The requester should
|
|
143
|
+
verify before closing.
|
|
144
|
+
- **done**: only when the prompt or task agent_instructions explicitly allow closing
|
|
145
|
+
without review ("auto-close", "mark as done", "no review needed"). A user saying "do
|
|
146
|
+
this task" is NOT permission to auto-close.
|
|
147
|
+
- **blocked**: an external factor outside your control stops you. Always log the
|
|
148
|
+
specific blocker.
|
|
149
|
+
- **in_progress** (keep): session ends but you can resume autonomously next time.
|
|
102
150
|
|
|
103
151
|
## Git workflow
|
|
104
|
-
- When the task
|
|
105
|
-
\`git checkout -b <branch_name>\` (or \`git checkout <branch_name>\` if it
|
|
106
|
-
- If the task has NO
|
|
152
|
+
- When the task context contains a branch_name, create or switch to it:
|
|
153
|
+
\`git checkout -b <branch_name>\` (or \`git checkout <branch_name>\` if it exists).
|
|
154
|
+
- If the task has NO branch_name, work on the current branch — do not create one.
|
|
107
155
|
- Do NOT work directly on main/master/develop unless the task has no branch_name and you
|
|
108
156
|
are already on a feature branch.
|
|
109
157
|
|
|
110
158
|
## Delivery flow
|
|
111
|
-
-
|
|
112
|
-
\`
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
\`
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
## Planning mode (
|
|
121
|
-
When you create an implementation plan
|
|
122
|
-
lifecycle steps as explicit items
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
##
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
| \`manage_orbit_item\` | \`orbitmap orbit attach\\|detach <orbit-id-or-slug> --type task\\|issue\\|vibe\\|document --id <uuid> [--note]\` |
|
|
246
|
-
| \`get_orbit_items\` | \`orbitmap orbit items <orbit-id-or-slug> [--type]\` |
|
|
247
|
-
|
|
248
|
-
Run \`orbitmap --help\` (or \`orbitmap <command> --help\`) for exact flags.`;
|
|
249
|
-
// ── The thin always-on hook (CLAUDE.md / AGENTS.md) ──
|
|
250
|
-
// Claude variant: points at the on-demand skill instead of inlining the full body.
|
|
159
|
+
- Commit messages: prefix the entity number with its type tag —
|
|
160
|
+
\`[TS-r5d8zf] Add delivery status field\` (also \`[IS-…]\`, \`[ID-…]\`, \`[VB-…]\`).
|
|
161
|
+
- When you committed/pushed code during the task, finish with
|
|
162
|
+
\`orbitmap status TS-x <status> --delivery on_branch\`.
|
|
163
|
+
- When the user asks what's in a branch/PR: \`git log target..source --oneline\`, parse
|
|
164
|
+
\`[TS-…]\`/\`[IS-…]\` tags, report the matched entities.
|
|
165
|
+
- When the user reports a merge or release: update the relevant tasks with
|
|
166
|
+
\`--delivery merged\` or \`--delivery released\`.
|
|
167
|
+
|
|
168
|
+
## Planning mode (agents with a plan mode)
|
|
169
|
+
When you create an implementation plan for a tracked task, you MUST include OrbitMap
|
|
170
|
+
lifecycle steps as explicit plan items:
|
|
171
|
+
- First step: reference the OrbitMap task number and title.
|
|
172
|
+
- Last steps, always: (1) \`orbitmap log\` with a summary of all changes; (2)
|
|
173
|
+
\`orbitmap status\` set per the status decision guide (or a resume-point log if
|
|
174
|
+
incomplete).
|
|
175
|
+
|
|
176
|
+
## Example: completing a task (default → in_review)
|
|
177
|
+
1. \`orbitmap tasks --status in_progress\` → empty
|
|
178
|
+
2. \`orbitmap start\` → task context
|
|
179
|
+
3. read agent_instructions; implement; run tests; commit with \`[TS-x]\` prefix
|
|
180
|
+
4. \`orbitmap log TS-x "Implemented X by doing Y" --type code_change\`
|
|
181
|
+
5. \`orbitmap log TS-x "Ready for review: all tests pass." --type note\`
|
|
182
|
+
6. \`orbitmap status TS-x in_review --delivery on_branch\``;
|
|
183
|
+
// ── Skill: orbitmap-planning — §8.5 ────────────────────────────────────────────
|
|
184
|
+
export const SKILL_PLANNING_FRONTMATTER = `---
|
|
185
|
+
name: orbitmap-planning
|
|
186
|
+
description: >
|
|
187
|
+
Planning with OrbitMap: missions (time-boxed focus), intents (goals grouping work),
|
|
188
|
+
promoting ideas to tasks, triaging issues, decomposing work into tasks and subtasks.
|
|
189
|
+
Use for "plan", "roadmap", "mission", "intent", "break this down", idea or issue
|
|
190
|
+
triage requests.
|
|
191
|
+
---`;
|
|
192
|
+
export const SKILL_PLANNING_BODY = `# Planning in OrbitMap
|
|
193
|
+
|
|
194
|
+
## Hierarchy
|
|
195
|
+
Mission (MS-) → Intent (IN-) → Task (TS-) / Issue (IS-). Missions and intents are
|
|
196
|
+
workspace-level; tasks live in areas. An intent groups the tasks/issues that realise one
|
|
197
|
+
goal; a mission time-boxes a set of intents (and directly-attached items) toward an
|
|
198
|
+
outcome. At most ONE mission is active at a time.
|
|
199
|
+
|
|
200
|
+
## Missions
|
|
201
|
+
- \`orbitmap mission list\` / \`orbitmap mission show MS-x\`
|
|
202
|
+
- \`orbitmap mission create "name" [--outcome "…"] [--start d] [--end d]\`
|
|
203
|
+
- \`orbitmap mission status MS-x active|completed|cancelled\` — activating fails while
|
|
204
|
+
another mission is active; complete or cancel it first.
|
|
205
|
+
- \`orbitmap mission link MS-x IN-y|TS-y|IS-y|ID-y\` / \`mission unlink\` — attach items.
|
|
206
|
+
|
|
207
|
+
## Intents
|
|
208
|
+
- \`orbitmap intent create "name" [--mission MS-x]\`, statuses:
|
|
209
|
+
new → design → plan → build → done (or cancelled); update with
|
|
210
|
+
\`orbitmap intent update IN-x --status build\`.
|
|
211
|
+
- \`orbitmap intent link IN-x TS-y|IS-y\` attaches work items to the intent.
|
|
212
|
+
- RULE (intent-exclusive): an item linked to an intent gets its mission THROUGH the
|
|
213
|
+
intent — never set a direct mission on a task/issue that has an intent. The CLI
|
|
214
|
+
enforces this; do not fight it.
|
|
215
|
+
|
|
216
|
+
## Planning workflow (recommended when the user asks to plan a body of work)
|
|
217
|
+
1. Clarify the outcome → \`orbitmap mission create\` (or pick the active mission).
|
|
218
|
+
2. Split into goals → \`orbitmap intent create\` per goal, \`mission link\` them.
|
|
219
|
+
3. Decompose each intent into concrete tasks →
|
|
220
|
+
\`orbitmap create "title" --intent IN-x [--priority p]\`, subtasks via
|
|
221
|
+
\`orbitmap subtask\`.
|
|
222
|
+
4. Wire ordering constraints → \`orbitmap dep add TS-a TS-b\` (a depends on b).
|
|
223
|
+
5. Review: \`orbitmap mission show MS-x\` and \`orbitmap overview\`.
|
|
224
|
+
|
|
225
|
+
## Ideas (opportunities, not problems)
|
|
226
|
+
- Capture: \`orbitmap idea add "…" [--priority p]\`.
|
|
227
|
+
- Review: \`orbitmap idea list\` (default pending).
|
|
228
|
+
- Promote to work: analyse the codebase first, then \`orbitmap create "task title"
|
|
229
|
+
--intent …\` referencing the idea in the description, then
|
|
230
|
+
\`orbitmap idea status ID-x used\`. Reject with \`… rejected\`.
|
|
231
|
+
|
|
232
|
+
## Issues (problems)
|
|
233
|
+
- Report: \`orbitmap issue register "title" --severity critical|high|medium|low
|
|
234
|
+
[--description "…"]\`.
|
|
235
|
+
- Start investigating: \`orbitmap issue status IS-x investigating\`.
|
|
236
|
+
- Convert to work: \`orbitmap create\` a fix task, link it, and resolve with
|
|
237
|
+
\`orbitmap issue resolve IS-x --task TS-y --resolution "…"\` (or status wont_fix /
|
|
238
|
+
duplicate with a reason).`;
|
|
239
|
+
// ── Skill: orbitmap-docs — §8.6 ────────────────────────────────────────────────
|
|
240
|
+
export const SKILL_DOCS_FRONTMATTER = `---
|
|
241
|
+
name: orbitmap-docs
|
|
242
|
+
description: >
|
|
243
|
+
Reading and updating OrbitMap documents (specs, architecture, guides, decisions).
|
|
244
|
+
Use when the user asks to read, import, or update project documentation tracked in
|
|
245
|
+
OrbitMap.
|
|
246
|
+
---`;
|
|
247
|
+
export const SKILL_DOCS_BODY = `# OrbitMap documents
|
|
248
|
+
|
|
249
|
+
## Choosing what to read
|
|
250
|
+
\`orbitmap docs\` lists documents with their \`context\` (when the doc is relevant) and
|
|
251
|
+
\`sections_count\`. Use context to pick the right document; use sections_count to decide
|
|
252
|
+
whether to fetch the TOC first (many sections) or go straight to full.
|
|
253
|
+
|
|
254
|
+
## Token-efficient reading flow
|
|
255
|
+
1. \`orbitmap doc <slug>\` → context + table of contents (cheap).
|
|
256
|
+
2. \`orbitmap doc <slug> --section "## Auth"\` → just that section.
|
|
257
|
+
3. \`orbitmap doc <slug> --full\` → full content (expensive — last resort).
|
|
258
|
+
Use the lightest mode that answers your question. When the CLI reports a local file path
|
|
259
|
+
for the full content, read that file instead of printing the content into the
|
|
260
|
+
conversation.
|
|
261
|
+
|
|
262
|
+
## Editing
|
|
263
|
+
- Import a new document: \`orbitmap doc-import <file.md> --title "…" --type
|
|
264
|
+
spec|architecture|api|guide|decision|changelog|other [--context "…"]\`.
|
|
265
|
+
- Update: \`orbitmap doc-update <slug> --file <file.md>\` (replaces content, bumps
|
|
266
|
+
version).
|
|
267
|
+
- To change an OrbitMap document, ALWAYS go through these commands — NEVER edit files
|
|
268
|
+
inside the OrbitMap workspace/cache directories directly.`;
|
|
269
|
+
export const SKILLS = [
|
|
270
|
+
{
|
|
271
|
+
name: 'orbitmap',
|
|
272
|
+
frontmatter: SKILL_ORBITMAP_FRONTMATTER,
|
|
273
|
+
body: SKILL_ORBITMAP_BODY,
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: 'orbitmap-working',
|
|
277
|
+
frontmatter: SKILL_WORKING_FRONTMATTER,
|
|
278
|
+
body: SKILL_WORKING_BODY,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: 'orbitmap-planning',
|
|
282
|
+
frontmatter: SKILL_PLANNING_FRONTMATTER,
|
|
283
|
+
body: SKILL_PLANNING_BODY,
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: 'orbitmap-docs',
|
|
287
|
+
frontmatter: SKILL_DOCS_FRONTMATTER,
|
|
288
|
+
body: SKILL_DOCS_BODY,
|
|
289
|
+
},
|
|
290
|
+
];
|
|
291
|
+
// ── The thin always-on hook (CLAUDE.md / AGENTS.md) ────────────────────────────
|
|
292
|
+
// Claude variant — §8.2, verbatim (without the markers, which buildClaudeHook adds).
|
|
251
293
|
export const THIN_HOOK_CLAUDE = `## OrbitMap
|
|
252
|
-
This project tracks its work in **OrbitMap**, reached via the \`orbitmap\` CLI (\`npx orbitmap <command>\`).
|
|
253
|
-
When the user mentions OrbitMap, a task, the backlog, issues, ideas, or asks to start/resume/finish/log work — use it.
|
|
254
|
-
|
|
255
|
-
Core loop: \`orbitmap tasks --status in_progress\` (resume) → \`orbitmap start\` (next todo) → read the task's
|
|
256
|
-
\`agent_instructions\` → implement → \`orbitmap log <id> "..." --type code_change\` → \`orbitmap status <id> in_review\`.
|
|
257
|
-
One task at a time; always log before finishing. Commit messages: \`[TS-<task_number>] summary\`.
|
|
258
294
|
|
|
259
|
-
|
|
260
|
-
|
|
295
|
+
This project tracks work in OrbitMap via the \`orbitmap\` CLI (works the same whether data
|
|
296
|
+
is in the cloud or in local files). When the user mentions tasks, backlog, missions,
|
|
297
|
+
intents, ideas, issues, vibes, or asks you to work on / log / plan something, load the
|
|
298
|
+
matching skill: \`orbitmap\` (context & commands), \`orbitmap-working\` (doing tasks),
|
|
299
|
+
\`orbitmap-planning\` (missions/intents/ideas/issues), \`orbitmap-docs\` (documents).
|
|
300
|
+
Golden rules: work on ONE task at a time; NEVER finish a task session without a final
|
|
301
|
+
\`orbitmap log\` entry and an \`orbitmap status\` update; finished work defaults to
|
|
302
|
+
\`in_review\`, not \`done\`. NEVER edit files inside the OrbitMap workspace directory
|
|
303
|
+
directly — always go through \`orbitmap\` commands.`;
|
|
304
|
+
// Non-Claude variant: same rules, but points at the inlined sections below instead of
|
|
305
|
+
// skills that these agents cannot load.
|
|
261
306
|
export const THIN_HOOK_GENERIC = `## OrbitMap
|
|
262
|
-
This project tracks its work in **OrbitMap**, reached via the \`orbitmap\` CLI (\`npx orbitmap <command>\`).
|
|
263
|
-
When the user mentions OrbitMap, a task, the backlog, issues, ideas, or asks to start/resume/finish/log work — use it.
|
|
264
|
-
|
|
265
|
-
Core loop: \`orbitmap tasks --status in_progress\` (resume) → \`orbitmap start\` (next todo) → read the task's
|
|
266
|
-
\`agent_instructions\` → implement → \`orbitmap log <id> "..." --type code_change\` → \`orbitmap status <id> in_review\`.
|
|
267
|
-
One task at a time; always log before finishing. Commit messages: \`[TS-<task_number>] summary\`.
|
|
268
307
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
308
|
+
This project tracks work in OrbitMap via the \`orbitmap\` CLI (works the same whether data
|
|
309
|
+
is in the cloud or in local files). When the user mentions tasks, backlog, missions,
|
|
310
|
+
intents, ideas, issues, vibes, or asks you to work on / log / plan something, follow the
|
|
311
|
+
sections below: core (context & commands), working on tasks, planning
|
|
312
|
+
(missions/intents/ideas/issues), and documents.
|
|
313
|
+
Golden rules: work on ONE task at a time; NEVER finish a task session without a final
|
|
314
|
+
\`orbitmap log\` entry and an \`orbitmap status\` update; finished work defaults to
|
|
315
|
+
\`in_review\`, not \`done\`. NEVER edit files inside the OrbitMap workspace directory
|
|
316
|
+
directly — always go through \`orbitmap\` commands.`;
|
|
317
|
+
// ── Assembly helpers ───────────────────────────────────────────────────────────
|
|
318
|
+
/** Build one SKILL.md file (frontmatter + body) for Claude. */
|
|
319
|
+
export function buildSkillFile(skill) {
|
|
320
|
+
return `${skill.frontmatter}\n\n${skill.body}\n`;
|
|
274
321
|
}
|
|
275
322
|
/** Build the thin always-on block for a Claude config file (CLAUDE.md). */
|
|
276
323
|
export function buildClaudeHook() {
|
|
277
324
|
return `${MARKER_START}\n${THIN_HOOK_CLAUDE}\n${MARKER_END}`;
|
|
278
325
|
}
|
|
279
326
|
/**
|
|
280
|
-
* Build the markdown fallback block for non-Claude agents: the thin hook plus
|
|
281
|
-
*
|
|
327
|
+
* Build the markdown fallback block for non-Claude agents: the thin hook plus all four
|
|
328
|
+
* skill bodies inlined (no skill ecosystem to lean on).
|
|
282
329
|
*/
|
|
283
330
|
export function buildGenericBlock() {
|
|
284
|
-
|
|
331
|
+
const bodies = SKILLS.map((skill) => skill.body).join('\n\n---\n\n');
|
|
332
|
+
return `${MARKER_START}\n${THIN_HOOK_GENERIC}\n\n${bodies}\n${MARKER_END}`;
|
|
285
333
|
}
|
|
286
334
|
//# sourceMappingURL=agent-instructions.js.map
|