orbitmap 0.5.0 → 0.6.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/dist/adapters/local/lists.d.ts +1 -1
- package/dist/adapters/local/lists.js +1 -1
- package/dist/adapters/local/lists.js.map +1 -1
- package/dist/adapters/local/rules.d.ts +1 -1
- package/dist/adapters/local/rules.js +1 -0
- package/dist/adapters/local/rules.js.map +1 -1
- package/dist/adapters/local/types.d.ts +1 -1
- package/dist/agent-instructions.d.ts +8 -7
- package/dist/agent-instructions.js +63 -62
- package/dist/agent-instructions.js.map +1 -1
- package/dist/commands/emit-instructions.d.ts +26 -0
- package/dist/commands/emit-instructions.js +68 -0
- package/dist/commands/emit-instructions.js.map +1 -0
- package/dist/commands/intent.js +7 -1
- package/dist/commands/intent.js.map +1 -1
- package/dist/commands/projects.d.ts +3 -0
- package/dist/commands/projects.js +28 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/setup-agent.d.ts +67 -13
- package/dist/commands/setup-agent.js +283 -28
- package/dist/commands/setup-agent.js.map +1 -1
- package/dist/commands/start.js +2 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/list-options.d.ts +1 -1
- package/dist/list-options.js +1 -1
- package/dist/list-options.js.map +1 -1
- package/package.json +1 -1
|
@@ -137,6 +137,39 @@ TL;DRs, areas, mission, task counts, the pair). Pair unchanged → the intent ha
|
|
|
137
137
|
moved: SAY SO in one line and keep working from what you hold — no full fetch. Pair
|
|
138
138
|
changed → re-fetch (\`intent show IN-x\`, with \`--no-logs\` when the log tail is not
|
|
139
139
|
needed) and remember the new pair in the focus file.`;
|
|
140
|
+
// ── Shared block: the KEEP/DROP TEST (IS-vw765j) ───────────────────────────────
|
|
141
|
+
//
|
|
142
|
+
// ONE definition rendered into all four gate skills. It used to be four byte-identical
|
|
143
|
+
// copies, which is why the contradiction below survived so long: `code_change` is a
|
|
144
|
+
// caller-authorable type, yet the drop list forbade exactly what such an entry is — a
|
|
145
|
+
// fact git already holds. Six worker-built tasks on IN-5pdqkq produced 1 blocker, 8
|
|
146
|
+
// decisions, 12 notes and ZERO code_change entries, every worker obeying the rules
|
|
147
|
+
// correctly. The exemption below resolves it; keeping the block in one place is what
|
|
148
|
+
// makes the next correction a one-line change.
|
|
149
|
+
//
|
|
150
|
+
// The bullet indent differs between skills (execute uses `- `, the three gate skills
|
|
151
|
+
// ` - `), so the caller passes it in; continuation lines sit two spaces further in.
|
|
152
|
+
export function worklogKeepDropTest(indent = '') {
|
|
153
|
+
const c = `${indent} `;
|
|
154
|
+
return `${indent}- KEEP/DROP TEST — log a \`decision\` when ANY of these is true: an alternative was
|
|
155
|
+
${c}considered and REJECTED (record which, and why it lost); a non-obvious assumption or
|
|
156
|
+
${c}constraint was LOCKED IN; a choice was made that a later reader would otherwise
|
|
157
|
+
${c}re-litigate. Do NOT log: restating the outcome, design or plan (they are already
|
|
158
|
+
${c}fields on the intent); confirming something already written down elsewhere; mechanical
|
|
159
|
+
${c}facts recoverable from git, CI or the tracker (test counts, file lists, commit hashes);
|
|
160
|
+
${c}progress narration ("started X", "working on Y").
|
|
161
|
+
${c}KEEP → "Parallelised the build across four subagents; the Laravel slices were split by
|
|
162
|
+
${c}file ownership to avoid collisions in one working tree." — records the rejected
|
|
163
|
+
${c}alternative (one agent per repo) and why it lost.
|
|
164
|
+
${c}DROP → "make verify green at 2415 passed after merging all four agents." — a mechanical
|
|
165
|
+
${c}fact already in the commit message and the CI output.
|
|
166
|
+
${c}EXEMPTION — \`code_change\` is the one type the "mechanical facts" rule does NOT
|
|
167
|
+
${c}forbid. Work that ships closes with ONE entry naming WHAT shipped and where: the
|
|
168
|
+
${c}shape of the change, never a file listing, which the \`[TS-x]\` commit already
|
|
169
|
+
${c}carries. Use it too for changes git CANNOT see — a config flipped in a dashboard, a
|
|
170
|
+
${c}migration run against a live database, an external system mutated. Without this a
|
|
171
|
+
${c}task records why every decision was made and never what was built.`;
|
|
172
|
+
}
|
|
140
173
|
// ── Skill: orbitmap (core) — §8.3 ──────────────────────────────────────────────
|
|
141
174
|
export const SKILL_ORBITMAP_FRONTMATTER = `---
|
|
142
175
|
name: orbitmap
|
|
@@ -393,13 +426,15 @@ MCP tool schemas are the authority. Never edit the workspace data files directly
|
|
|
393
426
|
delivered or honestly blocked and the gates are green vs baseline. An unfixable intent
|
|
394
427
|
test or a design contradiction → STOP and ask the user: that is intent-level risk, the
|
|
395
428
|
one thing that interrupts.
|
|
396
|
-
8. **Report +
|
|
397
|
-
intent branch is named in the report, not left underfoot. Report in
|
|
398
|
-
shipped, what was decided, what is blocked and why, deviations from the
|
|
399
|
-
results vs baseline. Write ONE resume
|
|
400
|
-
point: \`orbitmap log IN-x "Resume point: …" --type note\`.
|
|
401
|
-
|
|
402
|
-
|
|
429
|
+
8. **Report + move the intent to in_review.** Leave every repo checked out on its BASE
|
|
430
|
+
branch — the intent branch is named in the report, not left underfoot. Report in
|
|
431
|
+
chat: what shipped, what was decided, what is blocked and why, deviations from the
|
|
432
|
+
plan, gate results vs baseline. Write ONE resume
|
|
433
|
+
point: \`orbitmap log IN-x "Resume point: …" --type note\`. Then end the run:
|
|
434
|
+
\`orbitmap intent update IN-x --status in_review --log <entries>\` — the transition's
|
|
435
|
+
response carries an Instructions section (it will ask for release notes); FOLLOW it.
|
|
436
|
+
Merging and closing to \`done\` are the USER'S. The merge EVENT — whoever performs
|
|
437
|
+
it — is what later flips the tasks to \`--delivery merged\`.
|
|
403
438
|
|
|
404
439
|
**No subagent runtime?** Same flow, serial: do steps 4–7 yourself, task by task, with the
|
|
405
440
|
worker contract as your own build rules. The contract is the outcome, not the parallelism.
|
|
@@ -421,7 +456,7 @@ digraph orbitmap_execute {
|
|
|
421
456
|
"Regressions or intent-test failures?" [shape=diamond];
|
|
422
457
|
"Fix findings, scoped tests per fix" [shape=box];
|
|
423
458
|
"Intent-level risk: stop and ask the user" [shape=box];
|
|
424
|
-
"Report + resume note; intent
|
|
459
|
+
"Report + resume note; intent update --status in_review; user merges" [shape=doublecircle];
|
|
425
460
|
|
|
426
461
|
"Premise: intent at build, tasks with instructions?" -> "Refuse politely; point at the missing gate" [label="no"];
|
|
427
462
|
"Premise: intent at build, tasks with instructions?" -> "Baseline: full gate per touched repo, results recorded" [label="yes"];
|
|
@@ -439,7 +474,7 @@ digraph orbitmap_execute {
|
|
|
439
474
|
"Regressions or intent-test failures?" -> "Fix findings, scoped tests per fix" [label="yes"];
|
|
440
475
|
"Fix findings, scoped tests per fix" -> "Impact pass: full gate per repo, diff vs baseline (+contract steps)" [label="re-run"];
|
|
441
476
|
"Fix findings, scoped tests per fix" -> "Intent-level risk: stop and ask the user" [label="unfixable / contradiction"];
|
|
442
|
-
"Regressions or intent-test failures?" -> "Report + resume note; intent
|
|
477
|
+
"Regressions or intent-test failures?" -> "Report + resume note; intent update --status in_review; user merges" [label="no"];
|
|
443
478
|
}
|
|
444
479
|
\`\`\`
|
|
445
480
|
|
|
@@ -476,18 +511,7 @@ digraph orbitmap_execute {
|
|
|
476
511
|
\`blocker\` goes in as \`note\`, with \`--meta\` carrying any unusual structure. There is
|
|
477
512
|
deliberately NO \`other\` type. NEVER write \`status_change\` — the server authors it on
|
|
478
513
|
every transition and the API rejects it from clients.
|
|
479
|
-
|
|
480
|
-
considered and REJECTED (record which, and why it lost); a non-obvious assumption or
|
|
481
|
-
constraint was LOCKED IN; a choice was made that a later reader would otherwise
|
|
482
|
-
re-litigate. Do NOT log: restating the outcome, design or plan (they are already
|
|
483
|
-
fields on the intent); confirming something already written down elsewhere; mechanical
|
|
484
|
-
facts recoverable from git, CI or the tracker (test counts, file lists, commit hashes);
|
|
485
|
-
progress narration ("started X", "working on Y").
|
|
486
|
-
KEEP → "Parallelised the build across four subagents; the Laravel slices were split by
|
|
487
|
-
file ownership to avoid collisions in one working tree." — records the rejected
|
|
488
|
-
alternative (one agent per repo) and why it lost.
|
|
489
|
-
DROP → "make verify green at 2415 passed after merging all four agents." — a mechanical
|
|
490
|
-
fact already in the commit message and the CI output.
|
|
514
|
+
${worklogKeepDropTest()}
|
|
491
515
|
- Promote to the parent intent — TWO filters, BOTH must pass: the entry is a \`decision\` or
|
|
492
516
|
\`blocker\` (never \`note\`/\`code_change\`), AND it passes the keep/drop test. Then ALSO
|
|
493
517
|
write a SECOND, separately-worded entry for a reader who never saw the task:
|
|
@@ -533,7 +557,9 @@ digraph orbitmap_execute {
|
|
|
533
557
|
|
|
534
558
|
## Rules
|
|
535
559
|
- Flow A never merges, never pushes to the default branch, never closes tasks or the
|
|
536
|
-
intent as \`done\` — the run ends
|
|
560
|
+
intent as \`done\` — the run ends with \`orbitmap intent update IN-x --status in_review
|
|
561
|
+
--log …\` (follow the Instructions the transition returns); merging and \`done\` are
|
|
562
|
+
the user's.
|
|
537
563
|
- Baseline before any change; "no new bugs" = no failure absent from the baseline.
|
|
538
564
|
- The fix loop is goal-based — no round cap; termination is delivered-or-blocked plus
|
|
539
565
|
green gates, never a retry budget.
|
|
@@ -599,6 +625,12 @@ it blocks, a discovery or risk outside your boundary, what a failing check revea
|
|
|
599
625
|
NOT file lists, test counts, or progress narration. 1–3 entries on a normal task —
|
|
600
626
|
losing nothing is the goal, volume is not.
|
|
601
627
|
|
|
628
|
+
Close with ONE \`code_change\` entry naming WHAT you shipped and where — the shape of the
|
|
629
|
+
change, never a file listing, which the \`[TS-x]\` commit already carries. It is the one
|
|
630
|
+
type the "not mechanical facts" rule above does not forbid: without it your task records
|
|
631
|
+
why every decision was made and never what was built. Use it too for anything git cannot
|
|
632
|
+
see — a config flipped in a dashboard, a migration run against a live database.
|
|
633
|
+
|
|
602
634
|
## Report — your final text goes to the orchestrator, not to a user
|
|
603
635
|
Structure it as:
|
|
604
636
|
- **Files changed** — every file, one line each on what changed and why.
|
|
@@ -723,18 +755,7 @@ task/issue that has an intent; the CLI enforces this.
|
|
|
723
755
|
\`orbitmap intent update IN-x --areas <slug>,<slug>\` (the distinct areas of the
|
|
724
756
|
tasks you are creating). Declared areas feed session-focus matching for every later
|
|
725
757
|
session.
|
|
726
|
-
|
|
727
|
-
considered and REJECTED (record which, and why it lost); a non-obvious assumption or
|
|
728
|
-
constraint was LOCKED IN; a choice was made that a later reader would otherwise
|
|
729
|
-
re-litigate. Do NOT log: restating the outcome, design or plan (they are already
|
|
730
|
-
fields on the intent); confirming something already written down elsewhere; mechanical
|
|
731
|
-
facts recoverable from git, CI or the tracker (test counts, file lists, commit hashes);
|
|
732
|
-
progress narration ("started X", "working on Y").
|
|
733
|
-
KEEP → "Parallelised the build across four subagents; the Laravel slices were split by
|
|
734
|
-
file ownership to avoid collisions in one working tree." — records the rejected
|
|
735
|
-
alternative (one agent per repo) and why it lost.
|
|
736
|
-
DROP → "make verify green at 2415 passed after merging all four agents." — a mechanical
|
|
737
|
-
fact already in the commit message and the CI output.
|
|
758
|
+
${worklogKeepDropTest(' ')}
|
|
738
759
|
- LOG IT THE MOMENT IT IS AGREED, not batched at the end:
|
|
739
760
|
\`orbitmap log IN-x "<the decision and why — task shape, sequencing, area>" --type decision\`.
|
|
740
761
|
An abandoned session must still leave its decisions recorded.
|
|
@@ -992,18 +1013,7 @@ you hand to \`orbitmap-design\` (and, through the plan field, to \`orbitmap-plan
|
|
|
992
1013
|
and for whom, what success looks like, the constraints. As you go, capture the user's
|
|
993
1014
|
opinions, preferences and context as notes; these outrank your own ideas in the design
|
|
994
1015
|
stage, so record them faithfully.
|
|
995
|
-
|
|
996
|
-
considered and REJECTED (record which, and why it lost); a non-obvious assumption or
|
|
997
|
-
constraint was LOCKED IN; a choice was made that a later reader would otherwise
|
|
998
|
-
re-litigate. Do NOT log: restating the outcome, design or plan (they are already
|
|
999
|
-
fields on the intent); confirming something already written down elsewhere; mechanical
|
|
1000
|
-
facts recoverable from git, CI or the tracker (test counts, file lists, commit hashes);
|
|
1001
|
-
progress narration ("started X", "working on Y").
|
|
1002
|
-
KEEP → "Parallelised the build across four subagents; the Laravel slices were split by
|
|
1003
|
-
file ownership to avoid collisions in one working tree." — records the rejected
|
|
1004
|
-
alternative (one agent per repo) and why it lost.
|
|
1005
|
-
DROP → "make verify green at 2415 passed after merging all four agents." — a mechanical
|
|
1006
|
-
fact already in the commit message and the CI output.
|
|
1016
|
+
${worklogKeepDropTest(' ')}
|
|
1007
1017
|
- LOG IT THE MOMENT IT PASSES, not batched at the end: \`orbitmap log IN-x "<what was
|
|
1008
1018
|
decided and why>" --type decision\`. An abandoned session must still leave its decisions
|
|
1009
1019
|
recorded. If the intent does not exist yet, create it (step 4) at the first passing
|
|
@@ -1207,18 +1217,7 @@ well-bounded units are easier to build, review, and reason about.
|
|
|
1207
1217
|
cases, data/API shape. Continuously check whether the emerging design actually delivers
|
|
1208
1218
|
the outcome, and surface any gap where it would not. Capture the user's decisions and
|
|
1209
1219
|
the reasoning behind them as you go — those decisions are part of the design.
|
|
1210
|
-
|
|
1211
|
-
considered and REJECTED (record which, and why it lost); a non-obvious assumption or
|
|
1212
|
-
constraint was LOCKED IN; a choice was made that a later reader would otherwise
|
|
1213
|
-
re-litigate. Do NOT log: restating the outcome, design or plan (they are already
|
|
1214
|
-
fields on the intent); confirming something already written down elsewhere; mechanical
|
|
1215
|
-
facts recoverable from git, CI or the tracker (test counts, file lists, commit hashes);
|
|
1216
|
-
progress narration ("started X", "working on Y").
|
|
1217
|
-
KEEP → "Parallelised the build across four subagents; the Laravel slices were split by
|
|
1218
|
-
file ownership to avoid collisions in one working tree." — records the rejected
|
|
1219
|
-
alternative (one agent per repo) and why it lost.
|
|
1220
|
-
DROP → "make verify green at 2415 passed after merging all four agents." — a mechanical
|
|
1221
|
-
fact already in the commit message and the CI output.
|
|
1220
|
+
${worklogKeepDropTest(' ')}
|
|
1222
1221
|
- LOG IT THE MOMENT IT IS AGREED, not batched at the end: \`orbitmap log IN-x "<the choice
|
|
1223
1222
|
and why, incl. what it rules out>" --type decision\`. An abandoned session must still
|
|
1224
1223
|
leave its decisions recorded.
|
|
@@ -1431,7 +1430,7 @@ export const SKILLS = [
|
|
|
1431
1430
|
},
|
|
1432
1431
|
];
|
|
1433
1432
|
// ── The thin always-on hook (CLAUDE.md / AGENTS.md) ────────────────────────────
|
|
1434
|
-
// Claude variant — §8.2, verbatim (without the markers, which
|
|
1433
|
+
// Claude variant — §8.2, verbatim (without the markers, which buildClaudeBlock adds).
|
|
1435
1434
|
export const THIN_HOOK_CLAUDE = `## OrbitMap
|
|
1436
1435
|
|
|
1437
1436
|
Work is tracked in OrbitMap via the \`orbitmap\` CLI. You work in a WORKSPACE, which can span
|
|
@@ -1444,7 +1443,8 @@ Nothing gets built before it is framed: a feature, component or behaviour change
|
|
|
1444
1443
|
— outcome (brainstorm) → design → plan → build (execute), one gate at a time, written to the
|
|
1445
1444
|
intent as you go. Small self-contained work (a typo, an obvious one-file fix) is just a task.
|
|
1446
1445
|
NEVER finish a task, intent or mission without a final \`orbitmap log\` entry and a status update;
|
|
1447
|
-
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done
|
|
1446
|
+
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.
|
|
1447
|
+
OrbitMap tool responses may carry an Instructions section — act on it before continuing.`;
|
|
1448
1448
|
// Non-Claude variant: same rules, but points at the inlined sections below instead of
|
|
1449
1449
|
// skills that these agents cannot load.
|
|
1450
1450
|
export const THIN_HOOK_GENERIC = `## OrbitMap
|
|
@@ -1459,7 +1459,8 @@ Nothing gets built before it is framed: a feature, component or behaviour change
|
|
|
1459
1459
|
— outcome (brainstorm) → design → plan → build (execute), one gate at a time, written to the
|
|
1460
1460
|
intent as you go. Small self-contained work (a typo, an obvious one-file fix) is just a task.
|
|
1461
1461
|
NEVER finish a task, intent or mission without a final \`orbitmap log\` entry and a status update;
|
|
1462
|
-
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done
|
|
1462
|
+
the final entry closes a record that already exists. Finished work defaults to \`in_review\`, not \`done\`.
|
|
1463
|
+
OrbitMap tool responses may carry an Instructions section — act on it before continuing.`;
|
|
1463
1464
|
// ── Assembly helpers ───────────────────────────────────────────────────────────
|
|
1464
1465
|
/** Build one SKILL.md file (frontmatter + body) for Claude. */
|
|
1465
1466
|
export function buildSkillFile(skill) {
|
|
@@ -1482,7 +1483,7 @@ export const SKILL_SCOPE_CAVEAT_PROJECT = 'These skills are installed at PROJECT
|
|
|
1482
1483
|
* `scope` is where the accompanying skill files were installed — see
|
|
1483
1484
|
* {@link SKILL_SCOPE_CAVEAT_PROJECT}.
|
|
1484
1485
|
*/
|
|
1485
|
-
export function
|
|
1486
|
+
export function buildClaudeBlock(scope = 'user') {
|
|
1486
1487
|
const body = scope === 'project' ? `${THIN_HOOK_CLAUDE}\n${SKILL_SCOPE_CAVEAT_PROJECT}` : THIN_HOOK_CLAUDE;
|
|
1487
1488
|
return `${MARKER_START}\n${body}\n${MARKER_END}`;
|
|
1488
1489
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../src/agent-instructions.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,wEAAwE;AACxE,EAAE;AACF,2DAA2D;AAC3D,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,qEAAqE;AACrE,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,0CAA0C;AAC1C,wFAAwF;AACxF,wFAAwF;AACxF,sEAAsE;AACtE,qFAAqF;AACrF,qFAAqF;AACrF,iFAAiF;AACjF,wFAAwF;AAC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MAAM,0BAA0B,GAAG;;;;;;IAMtC,CAAC;AAEL,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCjC,qBAAqB;;EAErB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAqF6C,CAAC;AAEjE,qFAAqF;AAErF,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;IAWrC,CAAC;AAEL,MAAM,CAAC,MAAM,kBAAkB,GAAG
|
|
1
|
+
{"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../src/agent-instructions.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,wEAAwE;AACxE,EAAE;AACF,2DAA2D;AAC3D,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,qEAAqE;AACrE,6EAA6E;AAC7E,oFAAoF;AACpF,4DAA4D;AAC5D,8EAA8E;AAC9E,6EAA6E;AAC7E,kFAAkF;AAClF,8EAA8E;AAC9E,qFAAqF;AACrF,sFAAsF;AACtF,uFAAuF;AACvF,uFAAuF;AACvF,yFAAyF;AACzF,mFAAmF;AACnF,qFAAqF;AACrF,4EAA4E;AAC5E,oFAAoF;AACpF,kFAAkF;AAClF,2EAA2E;AAC3E,0DAA0D;AAC1D,0CAA0C;AAC1C,wFAAwF;AACxF,wFAAwF;AACxF,sEAAsE;AACtE,qFAAqF;AACrF,qFAAqF;AACrF,iFAAiF;AACjF,wFAAwF;AACxF,sFAAsF;AACtF,+CAA+C;AAC/C,EAAE;AACF,gFAAgF;AAChF,qFAAqF;AACrF,qFAAqF;AACrF,qFAAqF;AACrF,2EAA2E;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAA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AA0B,GACrC,uFAAuF;IACvF,uFAAuF;IACvF,sFAAsF;IACtF,0EAA0E,CAAC;AAE7E;;;;GAIG;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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `orbitmap emit-instructions` — the hook relay (IN-pp967d, TS-9r98vv).
|
|
3
|
+
*
|
|
4
|
+
* Reads a Claude Code hook payload (JSON) on stdin, lifts an Instructions block out of
|
|
5
|
+
* `tool_response.stdout` (marker contract pinned by tests/intent-instructions.test.ts:
|
|
6
|
+
* header `/^Instructions \(/` at column 0, body lines indented two spaces, interior
|
|
7
|
+
* blank lines allowed) and re-emits it as hook `additionalContext` so it lands at
|
|
8
|
+
* instruction tier instead of data tier.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately dumb: no OrbitMap semantics, no network, no adapter — a new producer of
|
|
11
|
+
* the marker (PreToolUse, SessionStart, another command) needs no change here, and the
|
|
12
|
+
* command runs on every matching Bash call, so it must do no work beyond parse → grep →
|
|
13
|
+
* print. On any problem (malformed JSON, missing fields, no block) it exits 0 silently:
|
|
14
|
+
* a hook that throws is worse than one that says nothing.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Extracts the Instructions block from a tool's stdout, or null when there is none.
|
|
18
|
+
*
|
|
19
|
+
* Rule: the block starts at the first line matching /^Instructions \(/ and extends over
|
|
20
|
+
* every following line that begins with two spaces. A blank line is part of the block
|
|
21
|
+
* only when a later two-space-indented line follows it before the block ends (interior
|
|
22
|
+
* blank lines belong to the body); the block ends at the first line that is neither
|
|
23
|
+
* blank nor two-space-indented, and a trailing run of blank lines is excluded.
|
|
24
|
+
*/
|
|
25
|
+
export declare function extractInstructionsBlock(stdout: string): string | null;
|
|
26
|
+
export declare function emitInstructionsCommand(input?: NodeJS.ReadableStream): Promise<void>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `orbitmap emit-instructions` — the hook relay (IN-pp967d, TS-9r98vv).
|
|
3
|
+
*
|
|
4
|
+
* Reads a Claude Code hook payload (JSON) on stdin, lifts an Instructions block out of
|
|
5
|
+
* `tool_response.stdout` (marker contract pinned by tests/intent-instructions.test.ts:
|
|
6
|
+
* header `/^Instructions \(/` at column 0, body lines indented two spaces, interior
|
|
7
|
+
* blank lines allowed) and re-emits it as hook `additionalContext` so it lands at
|
|
8
|
+
* instruction tier instead of data tier.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately dumb: no OrbitMap semantics, no network, no adapter — a new producer of
|
|
11
|
+
* the marker (PreToolUse, SessionStart, another command) needs no change here, and the
|
|
12
|
+
* command runs on every matching Bash call, so it must do no work beyond parse → grep →
|
|
13
|
+
* print. On any problem (malformed JSON, missing fields, no block) it exits 0 silently:
|
|
14
|
+
* a hook that throws is worse than one that says nothing.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Extracts the Instructions block from a tool's stdout, or null when there is none.
|
|
18
|
+
*
|
|
19
|
+
* Rule: the block starts at the first line matching /^Instructions \(/ and extends over
|
|
20
|
+
* every following line that begins with two spaces. A blank line is part of the block
|
|
21
|
+
* only when a later two-space-indented line follows it before the block ends (interior
|
|
22
|
+
* blank lines belong to the body); the block ends at the first line that is neither
|
|
23
|
+
* blank nor two-space-indented, and a trailing run of blank lines is excluded.
|
|
24
|
+
*/
|
|
25
|
+
export function extractInstructionsBlock(stdout) {
|
|
26
|
+
const lines = stdout.split('\n');
|
|
27
|
+
const start = lines.findIndex((line) => /^Instructions \(/.test(line));
|
|
28
|
+
if (start === -1)
|
|
29
|
+
return null;
|
|
30
|
+
let end = start + 1; // exclusive index just past the last confirmed block line
|
|
31
|
+
for (let i = start + 1; i < lines.length; i++) {
|
|
32
|
+
const line = lines[i];
|
|
33
|
+
if (line.startsWith(' ')) {
|
|
34
|
+
end = i + 1; // confirms this line and any blank run before it
|
|
35
|
+
}
|
|
36
|
+
else if (line !== '') {
|
|
37
|
+
break; // neither blank nor indented — the block is over
|
|
38
|
+
}
|
|
39
|
+
// blank line: tentatively skipped; included only if a later indented line confirms it
|
|
40
|
+
}
|
|
41
|
+
return lines.slice(start, end).join('\n');
|
|
42
|
+
}
|
|
43
|
+
async function readStream(input) {
|
|
44
|
+
const chunks = [];
|
|
45
|
+
for await (const chunk of input) {
|
|
46
|
+
chunks.push(typeof chunk === 'string' ? Buffer.from(chunk, 'utf8') : chunk);
|
|
47
|
+
}
|
|
48
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
49
|
+
}
|
|
50
|
+
export async function emitInstructionsCommand(input = process.stdin) {
|
|
51
|
+
try {
|
|
52
|
+
const payload = JSON.parse(await readStream(input));
|
|
53
|
+
const eventName = payload?.hook_event_name;
|
|
54
|
+
const stdout = payload?.tool_response?.stdout;
|
|
55
|
+
if (typeof eventName !== 'string' || typeof stdout !== 'string' || stdout === '')
|
|
56
|
+
return;
|
|
57
|
+
const block = extractInstructionsBlock(stdout);
|
|
58
|
+
if (block === null)
|
|
59
|
+
return;
|
|
60
|
+
console.log(JSON.stringify({
|
|
61
|
+
hookSpecificOutput: { hookEventName: eventName, additionalContext: block },
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// Silent by design — never break the hook chain. Exit code stays 0.
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=emit-instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit-instructions.js","sourceRoot":"","sources":["../../src/commands/emit-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAc;IACrD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACvE,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAE9B,IAAI,GAAG,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,0DAA0D;IAC/E,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,iDAAiD;QAChE,CAAC;aAAM,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YACvB,MAAM,CAAC,iDAAiD;QAC1D,CAAC;QACD,sFAAsF;IACxF,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,KAA4B;IACpD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAE,KAAgB,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAA+B,OAAO,CAAC,KAAK;IAE5C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,CAGjD,CAAC;QAEF,MAAM,SAAS,GAAG,OAAO,EAAE,eAAe,CAAC;QAC3C,MAAM,MAAM,GAAG,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC;QAC9C,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,EAAE;YAAE,OAAO;QAEzF,MAAM,KAAK,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO;QAE3B,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CAAC;YACb,kBAAkB,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE;SAC3E,CAAC,CACH,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,oEAAoE;IACtE,CAAC;AACH,CAAC"}
|
package/dist/commands/intent.js
CHANGED
|
@@ -3,7 +3,7 @@ import { OrbitMapAPIError } from '../errors.js';
|
|
|
3
3
|
import { formatOutput, printError, printSuccess, formatTable, printValidationError } from '../output.js';
|
|
4
4
|
import { describeWorkLogRequirement, formatWorkLogs, parseLogFlags, } from '../work-log.js';
|
|
5
5
|
import { fetchAllPages, formatEmptyLine, printListMeta, } from '../list-meta.js';
|
|
6
|
-
const VALID_INTENT_STATUSES = ['new', 'design', 'plan', 'build', 'done', 'cancelled'];
|
|
6
|
+
const VALID_INTENT_STATUSES = ['new', 'design', 'plan', 'build', 'in_review', 'done', 'cancelled'];
|
|
7
7
|
const VALID_ITEM_TYPES = ['task', 'issue'];
|
|
8
8
|
function printIntentDetail(intent) {
|
|
9
9
|
console.log(`Intent: ${intent.name} [${intent.display_number}]`);
|
|
@@ -297,6 +297,12 @@ export async function intentUpdateCommand(idOrNumber, options) {
|
|
|
297
297
|
if (logs.length > 0) {
|
|
298
298
|
msg += `\nLogged ${logs.length} work log ${logs.length === 1 ? 'entry' : 'entries'}.`;
|
|
299
299
|
}
|
|
300
|
+
// The Instructions section, when the server sent one: a blank line, then the
|
|
301
|
+
// server's text byte-for-byte. The `Instructions (` header at column 0 is the
|
|
302
|
+
// marker the emit-instructions hook greps for — never re-wrap or re-word it.
|
|
303
|
+
if (response.instructions) {
|
|
304
|
+
msg += `\n\n${response.instructions.text}`;
|
|
305
|
+
}
|
|
300
306
|
printSuccess(msg, false);
|
|
301
307
|
}
|
|
302
308
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../../src/commands/intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzG,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,GAEd,MAAM,iBAAiB,CAAC;AAEzB,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,QAAQ,E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;QAED,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,YAAY,CAAC,6BAA6B,UAAU,GAAG,EAAE,KAAK,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,UAAU,UAAU,iBAAiB,OAAO,GAAG,EAAE,KAAK,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createClient } from '../api-client.js';
|
|
2
|
+
import { formatOutput, printError, formatTable } from '../output.js';
|
|
3
|
+
export async function projectsCommand(options) {
|
|
4
|
+
try {
|
|
5
|
+
const client = await createClient();
|
|
6
|
+
const response = (await client.getProjects());
|
|
7
|
+
if (options.json) {
|
|
8
|
+
console.log(formatOutput(response, true));
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const projects = response.data;
|
|
12
|
+
if (projects.length === 0) {
|
|
13
|
+
console.log('No projects found.');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
console.log(formatTable(['Name', 'Slug', 'Role', 'Current'], projects.map((p) => [
|
|
17
|
+
p.name,
|
|
18
|
+
p.slug,
|
|
19
|
+
p.role,
|
|
20
|
+
p._current ? '*' : '',
|
|
21
|
+
])));
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
printError(error, options.json);
|
|
25
|
+
process.exitCode = 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAcrE,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAErC;IACC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,CAAC,MAAM,MAAM,CAAC,WAAW,EAAE,CAAqB,CAAC;QAElE,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;QAE/B,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CACT,WAAW,CACT,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EACnC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAClB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;SACtB,CAAC,CACH,CACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -6,7 +6,7 @@ export type AgentType = 'claude' | 'gemini' | 'codex' | 'cursor' | 'windsurf' |
|
|
|
6
6
|
* `~/.codex`). This is the DEFAULT, because agent skills do **not** traverse
|
|
7
7
|
* directories: a project-level `.claude/skills/` is invisible to a session
|
|
8
8
|
* started in a sibling or child repository, while `CLAUDE.md` *is* inherited
|
|
9
|
-
* downwards — so a project-scope install hands sub-directories a
|
|
9
|
+
* downwards — so a project-scope install hands sub-directories a block that
|
|
10
10
|
* tells them to load skills they cannot see. A workspace now legitimately
|
|
11
11
|
* spans several area directories (IN-rwb5qu), so one project-scope install
|
|
12
12
|
* would only ever cover one of them.
|
|
@@ -45,12 +45,59 @@ export interface InstallTarget {
|
|
|
45
45
|
* Resolve where an install lands.
|
|
46
46
|
*
|
|
47
47
|
* User scope writes **only** under the agent's personal config directory — nothing is
|
|
48
|
-
* written into the project. That is the point: at user scope the skills and the
|
|
48
|
+
* written into the project. That is the point: at user scope the skills and the block
|
|
49
49
|
* that references them are both visible from every directory, so there is no reason to
|
|
50
50
|
* leave a second, narrower copy behind in one repository.
|
|
51
51
|
*/
|
|
52
52
|
export declare function resolveInstallTarget(agentType: AgentType, scope: SkillScope, cwd: string, homeDir?: string): InstallTarget;
|
|
53
53
|
export declare function detectAgent(cwdOverride?: string): AgentType | null;
|
|
54
|
+
/**
|
|
55
|
+
* The command our PostToolUse hook entry runs (`src/commands/emit-instructions.ts`): it
|
|
56
|
+
* re-emits any `Instructions (…)` block from an orbitmap command's stdout as
|
|
57
|
+
* `additionalContext`, so the block lands at instruction tier instead of data tier.
|
|
58
|
+
*
|
|
59
|
+
* This string is also the entry's IDENTITY. JSON has no comments, so the
|
|
60
|
+
* `ORBITMAP_START`/`ORBITMAP_END` marker convention the markdown blocks rely on cannot be
|
|
61
|
+
* reproduced here — our entry is recognised by `command === EMIT_INSTRUCTIONS_COMMAND`,
|
|
62
|
+
* never by array position. Changing this string orphans every installed entry.
|
|
63
|
+
*/
|
|
64
|
+
export declare const EMIT_INSTRUCTIONS_COMMAND = "orbitmap emit-instructions";
|
|
65
|
+
/**
|
|
66
|
+
* Where the hook entry lives for a resolved install target, or `null` when this agent
|
|
67
|
+
* has no hook mechanism this CLI knows how to write.
|
|
68
|
+
*
|
|
69
|
+
* - Claude Code: `settings.json` in the same `.claude/` directory as the skills — the
|
|
70
|
+
* hook always lands in the scope the rest of the install used (project install →
|
|
71
|
+
* `<project>/.claude/settings.json`, user install → `~/.claude/settings.json`).
|
|
72
|
+
* - Codex: `hooks.json` next to the `AGENTS.md` the instructions block went into —
|
|
73
|
+
* but only at user scope: Codex reads hooks from its `~/.codex` directory only, so a
|
|
74
|
+
* project-scope install writes none (and says so).
|
|
75
|
+
*
|
|
76
|
+
* Paths are derived from the {@link InstallTarget}, never from `os.homedir()` directly,
|
|
77
|
+
* so hermetic tests that pass an explicit home stay inside their sandbox.
|
|
78
|
+
*/
|
|
79
|
+
export declare function resolveHookSettingsPath(agentType: AgentType, target: InstallTarget): string | null;
|
|
80
|
+
export type HookWriteResult = 'created' | 'updated' | 'unchanged' | 'skipped';
|
|
81
|
+
/**
|
|
82
|
+
* Install our PostToolUse hook entry into `settingsPath`, idempotently and in the spirit
|
|
83
|
+
* of {@link writeBlock}: every key we do not own is preserved verbatim, our entry is
|
|
84
|
+
* APPENDED beside any hooks the user already has, and a second run changes nothing
|
|
85
|
+
* (`unchanged` leaves the file byte-identical).
|
|
86
|
+
*
|
|
87
|
+
* A file that is not valid JSON (or not a JSON object) is never rewritten — that returns
|
|
88
|
+
* `skipped`, and the caller must say so out loud: a hook silently not installed is a
|
|
89
|
+
* dead channel with no signal.
|
|
90
|
+
*/
|
|
91
|
+
export declare function writeEmitInstructionsHook(settingsPath: string): HookWriteResult;
|
|
92
|
+
/**
|
|
93
|
+
* Remove our hook entry from `settingsPath` — and nothing else.
|
|
94
|
+
*
|
|
95
|
+
* Mirrors the guarantee of {@link removeProjectInstall}: a user's own hooks and every
|
|
96
|
+
* unrelated key survive verbatim, an unreadable file is left alone, and the file itself
|
|
97
|
+
* is deleted only when our entry was its entire content (i.e. this CLI created it).
|
|
98
|
+
* Returns whether anything was removed.
|
|
99
|
+
*/
|
|
100
|
+
export declare function removeEmitInstructionsHook(settingsPath: string): boolean;
|
|
54
101
|
/**
|
|
55
102
|
* What a previous project-scope install left behind in `cwd`.
|
|
56
103
|
*
|
|
@@ -65,24 +112,28 @@ export interface StaleProjectInstall {
|
|
|
65
112
|
skillDirs: string[];
|
|
66
113
|
/** Absolute path of the agent config file that still carries our marker block, if any. */
|
|
67
114
|
configPath: string | null;
|
|
115
|
+
/** Absolute path of a `.claude/settings.json` that still carries our hook entry, if any. */
|
|
116
|
+
settingsPath: string | null;
|
|
68
117
|
}
|
|
69
118
|
/**
|
|
70
119
|
* Find a previous project-scope install in `cwd`.
|
|
71
120
|
*
|
|
72
|
-
* Deliberately narrow: only the five skill directories this CLI creates by name,
|
|
73
|
-
* a config file that actually contains OUR marker block
|
|
74
|
-
*
|
|
75
|
-
*
|
|
121
|
+
* Deliberately narrow: only the five skill directories this CLI creates by name, only
|
|
122
|
+
* a config file that actually contains OUR marker block, and only a `settings.json`
|
|
123
|
+
* that actually contains OUR hook entry. A user's own skill in `.claude/skills/`, an
|
|
124
|
+
* unrelated `CLAUDE.md`, or a `.claude/settings.json` without our entry are invisible
|
|
125
|
+
* here — which is what makes the cleanup below safe.
|
|
76
126
|
*/
|
|
77
127
|
export declare function detectProjectInstall(cwd: string, agentType: AgentType): StaleProjectInstall | null;
|
|
78
128
|
/**
|
|
79
129
|
* Remove a stale project-scope install — and nothing else.
|
|
80
130
|
*
|
|
81
|
-
* Only ever touches: the five skill directories named in {@link StaleProjectInstall},
|
|
82
|
-
* the marker-delimited block inside the config file
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
131
|
+
* Only ever touches: the five skill directories named in {@link StaleProjectInstall},
|
|
132
|
+
* the marker-delimited block inside the config file, and OUR hook entry inside
|
|
133
|
+
* `settings.json`. Text outside the markers — and every settings key that is not our
|
|
134
|
+
* entry — is kept verbatim; each file is deleted only when our content was its entire
|
|
135
|
+
* content (i.e. this CLI created it). Parent directories are removed only when they are
|
|
136
|
+
* already empty — a `.claude/` holding a user's own skills or settings survives intact.
|
|
86
137
|
* There is no recursive delete of `.claude` anywhere in this function.
|
|
87
138
|
*/
|
|
88
139
|
export declare function removeProjectInstall(stale: StaleProjectInstall): string[];
|
|
@@ -102,8 +153,10 @@ export declare function parseAgentType(value: string): AgentType | null;
|
|
|
102
153
|
* Install the OrbitMap skills for one agent, non-interactively and idempotently.
|
|
103
154
|
*
|
|
104
155
|
* At the default `user` scope: Claude Code → `~/.claude/skills/<name>/SKILL.md` × 4 +
|
|
105
|
-
* the
|
|
106
|
-
* `~/.
|
|
156
|
+
* the instructions block in `~/.claude/CLAUDE.md` + the PostToolUse hook entry in
|
|
157
|
+
* `~/.claude/settings.json`; Gemini/Codex → the inlined block in `~/.gemini/GEMINI.md` /
|
|
158
|
+
* `~/.codex/AGENTS.md` (Codex also gets the hook entry in `~/.codex/hooks.json`, with
|
|
159
|
+
* its two remaining manual steps printed). **Nothing is written into `cwd`.**
|
|
107
160
|
* At `project` scope everything lands in `cwd`, exactly as it used to.
|
|
108
161
|
*
|
|
109
162
|
* Safe to call repeatedly: identical input leaves the tree byte-identical, and the
|
|
@@ -115,6 +168,7 @@ export declare function parseAgentType(value: string): AgentType | null;
|
|
|
115
168
|
*/
|
|
116
169
|
export declare function installAgentSkills(cwd: string, agentType: AgentType, scope?: SkillScope, options?: {
|
|
117
170
|
cleanProject?: boolean;
|
|
171
|
+
homeDir?: string;
|
|
118
172
|
}): Promise<InstallTarget>;
|
|
119
173
|
/**
|
|
120
174
|
* What the drift check found in the installed config files, for tests and callers.
|