@neurodock/cli 0.8.2 → 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/CHANGELOG.md +17 -0
- package/README.md +45 -11
- package/dist/assets/schemas/neurotype-addenda.schema.json +167 -0
- package/dist/assets/schemas/profile.example.yaml +9 -0
- package/dist/assets/schemas/profile.schema.json +116 -0
- package/dist/assets/skills/adhd-daily-planner/SKILL.md +131 -0
- package/dist/assets/skills/asd-meeting-translator/SKILL.md +177 -0
- package/dist/assets/skills/audhd-context-recovery/SKILL.md +93 -0
- package/dist/assets/skills/dyspraxia-task-pacer/SKILL.md +174 -0
- package/dist/assets/skills/hyperfocus-formatter/SKILL.md +89 -0
- package/dist/assets/skills/ocd-decision-finalizer/SKILL.md +109 -0
- package/dist/assets/skills/visual-organizer/SKILL.md +94 -0
- package/dist/commands/install-all.d.ts +21 -0
- package/dist/commands/install-all.d.ts.map +1 -1
- package/dist/commands/install-all.js +52 -0
- package/dist/commands/install-all.js.map +1 -1
- package/dist/commands/install-skills.d.ts +26 -0
- package/dist/commands/install-skills.d.ts.map +1 -0
- package/dist/commands/install-skills.js +164 -0
- package/dist/commands/install-skills.js.map +1 -0
- package/dist/commands/setup.d.ts +6 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +1 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/skills.d.ts +40 -0
- package/dist/lib/skills.d.ts.map +1 -0
- package/dist/lib/skills.js +115 -0
- package/dist/lib/skills.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ocd-decision-finalizer
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
description: Surfaces prior decision evidence on repeat-validation requests; declines further re-analysis until new information appears.
|
|
5
|
+
neurotypes: ["ocd"]
|
|
6
|
+
status: beta
|
|
7
|
+
triggers:
|
|
8
|
+
- phrase_pattern: "should I really"
|
|
9
|
+
- phrase_pattern: "is this okay"
|
|
10
|
+
- phrase_pattern: "am I sure"
|
|
11
|
+
- phrase_pattern: "should we revisit"
|
|
12
|
+
mcp_dependencies:
|
|
13
|
+
- server: mcp-cognitive-graph
|
|
14
|
+
tools: [recall_decisions, recall_entity, record_fact]
|
|
15
|
+
profile_dependencies:
|
|
16
|
+
- identity.neurotypes
|
|
17
|
+
- guardrails.sycophancy_check
|
|
18
|
+
license: AGPL-3.0-or-later
|
|
19
|
+
authors:
|
|
20
|
+
- neurodock-core
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# ocd-decision-finalizer
|
|
24
|
+
|
|
25
|
+
This skill responds to repeat re-validation of an already-made decision by surfacing the prior decision verbatim from the cognitive graph and declining to re-analyse it until the user supplies new information. It is a workflow tool, not a clinical intervention. The user remains the authority and can override at any time.
|
|
26
|
+
|
|
27
|
+
# TODO: phase-2 mcp-guardrail integration — once `mcp-guardrail.check_rumination` is shipped, this skill will defer count-keeping to that server and only handle the response shape.
|
|
28
|
+
|
|
29
|
+
## Activation criteria
|
|
30
|
+
|
|
31
|
+
Activate only when **all** of the following are true:
|
|
32
|
+
|
|
33
|
+
- `profile.identity.neurotypes` contains `"ocd"`. If the user has not self-IDed OCD, this skill does not run. Never infer the neurotype from the user's text.
|
|
34
|
+
- The user's current message contains one of the trigger phrase patterns: `should I really`, `is this okay`, `am I sure`, `should we revisit`.
|
|
35
|
+
- The user's message names, or clearly references, a decision (a named technology, vendor, person, plan, or named project decision). If no decision is identifiable, do not activate — respond normally.
|
|
36
|
+
|
|
37
|
+
Do not activate if the user's message includes an explicit override token (see step 5).
|
|
38
|
+
|
|
39
|
+
## Operating instructions
|
|
40
|
+
|
|
41
|
+
Follow these steps in order. Do not improvise extra tool calls.
|
|
42
|
+
|
|
43
|
+
1. **Resolve the decision.** If the user names the decision directly (e.g. "Postgres" or "the v0.2 release plan"), call `mcp-cognitive-graph.recall_entity(name_or_alias=<the named thing>)`. If `entity` is null or `entity.type` is not `decision`, fall through to step 2. Otherwise remember `decision_id = entity.id`.
|
|
44
|
+
|
|
45
|
+
2. **List recent decisions for the project.** Call `mcp-cognitive-graph.recall_decisions(project=<the project the user is working in>, since=<14 days ago, ISO date>)`. Match the decision the user is asking about by string similarity against `decisions[].name`. If no match crosses 0.6 similarity, do not activate — respond normally and note "I do not have a prior decision record matching this; treating it as a fresh question." Stop.
|
|
46
|
+
|
|
47
|
+
3. **Count prior re-validations.** From the `facts` array on a `recall_entity(name_or_alias=decision_id)` call, count facts where `predicate == "tagged"` and `object.literal == "re-validated"`, scoped to the current local day. Call this count `N`.
|
|
48
|
+
|
|
49
|
+
4. **Detect fresh context in the current message.** If the user's message contains an explicit fresh-context marker — `this is new`, `since I last asked`, `new information`, `update:`, or a clearly novel fact not present in the existing facts — treat this as fresh context. Skip finality. Record the new fact: `record_fact(subject={type: "decision", id: decision_id}, predicate="mentioned_in", object={literal: <the new fact, verbatim, max 200 chars>}, source="ocd-decision-finalizer", confidence=0.8)`. Then respond normally. Stop.
|
|
50
|
+
|
|
51
|
+
5. **Detect explicit override.** If the user's message ends with `--override "fresh-context"` (or any `--override "<reason>"` form), respect it. Record the override locally only: `record_fact(subject={type: "decision", id: decision_id}, predicate="tagged", object={literal: "override:<reason>"}, source="ocd-decision-finalizer", confidence=1.0)`. Respond normally. The override is not transmitted; it is a local audit row. Stop.
|
|
52
|
+
|
|
53
|
+
6. **Log this re-validation request.** Before producing a response, call `record_fact(subject={type: "decision", id: decision_id}, predicate="tagged", object={literal: "re-validated"}, source="ocd-decision-finalizer", confidence=1.0)`. This call must happen on every activation that reaches this step so a future call sees the correct `N`.
|
|
54
|
+
|
|
55
|
+
7. **Branch on N.**
|
|
56
|
+
- If the post-write `N` is less than 3 (i.e. before this call there were fewer than 2 prior re-validations today): respond normally to the user's question, with one extra sentence: `This is the Nth time we have revisited this today; previously concluded: <decision.name> on <decided_on>.` Stop.
|
|
57
|
+
- If the post-write `N` is 3 or greater: enter **decision-finality mode** below.
|
|
58
|
+
|
|
59
|
+
## Decision-finality mode (output shape when N ≥ 3)
|
|
60
|
+
|
|
61
|
+
Render the following four-section response, in this order. Plain prose. No headers above the first section other than a one-line opener.
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Opener (≤ 80 chars): direct, factual, names the decision and the count.
|
|
65
|
+
|
|
66
|
+
### What was decided
|
|
67
|
+
> "<decision.name>"
|
|
68
|
+
Decided on <decided_on>. Confidence at recording: <confidence with two decimals>.
|
|
69
|
+
Attribution: <decided_by[*].name comma-separated, or "unattributed">.
|
|
70
|
+
Source: <source verbatim if non-null, otherwise omit this line>.
|
|
71
|
+
|
|
72
|
+
### What you weighed
|
|
73
|
+
<Up to 5 bullets from facts on the decision entity where predicate is "mentioned_in"
|
|
74
|
+
and object.literal contains a trade-off marker (e.g. "trade-off:", "vs", "weighed").
|
|
75
|
+
Quote each literal verbatim. If no such facts exist, write the single line:
|
|
76
|
+
"No trade-offs recorded against this decision in the graph.">
|
|
77
|
+
|
|
78
|
+
### The grounded reply
|
|
79
|
+
I will not re-analyse this decision unless you give me new information. If something has changed, tell me what changed.
|
|
80
|
+
|
|
81
|
+
### Override
|
|
82
|
+
If you want me to run the analysis again anyway, repeat the message with `--override "fresh-context"` appended. The override is logged locally only.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Rules:
|
|
86
|
+
|
|
87
|
+
- Every quoted decision name must come back verbatim from the graph. Do not paraphrase, summarise, or "polish" the title.
|
|
88
|
+
- The opener is one line. It states "This is the Nth time today" with the integer, and the decision name. No softening adjectives. No "I notice that".
|
|
89
|
+
- The "what you weighed" section is bounded at 5 bullets. If more than 5 candidate facts exist, take the 5 with the most recent `recorded_at` and append one closing line `(<M> further trade-off facts in the graph; ask for them if you want the full list.)`
|
|
90
|
+
- The override line is always present when finality fires. Without it the response is non-overridable, which violates the ethics contract (see ethics framework, items 2 and 3).
|
|
91
|
+
|
|
92
|
+
## What this skill is not
|
|
93
|
+
|
|
94
|
+
This is not a clinical intervention. It is not a refusal to help. It is not a judgement about the user. It surfaces prior reasoning from the graph and asks the user to add new information before more analysis. The user is the authority on whether to override. There is no diagnosis here, no treatment claim, no implication that the user is doing something wrong.
|
|
95
|
+
|
|
96
|
+
## Do not
|
|
97
|
+
|
|
98
|
+
- Do not use the words `rumination`, `anxiety`, `obsessive`, `compulsive`, `spiral`, `loop`, `executive function`, `neurodivergent`, `executive dysfunction`, or `intrusive` in user-facing output.
|
|
99
|
+
- Do not lecture about repetition. Do not say "you've asked this before — try to let it go".
|
|
100
|
+
- Do not paraphrase the decision name. Quote it verbatim from the graph.
|
|
101
|
+
- Do not fabricate a decision when `recall_decisions` returned none. Fall through to normal response.
|
|
102
|
+
- Do not fire when `"ocd"` is absent from `profile.identity.neurotypes`. The skill is opt-in by neurotype self-ID.
|
|
103
|
+
- Do not transmit the override anywhere; it is a local audit row only.
|
|
104
|
+
- Do not enter finality mode without surfacing the override path in the same response.
|
|
105
|
+
- Do not call `record_fact` more than twice per activation (one re-validation tag, optionally one fresh-context fact). Extra writes pollute the graph.
|
|
106
|
+
|
|
107
|
+
## Examples
|
|
108
|
+
|
|
109
|
+
See `tests/01-fourth-revalidation-same-day.md`, `tests/02-new-information-resets-counter.md`, and `tests/03-explicit-override.md` for full invocation traces.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-organizer
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
description: Converts prose, meeting notes, or overwhelm-dumps into Mermaid diagrams (flowchart / sequence / mindmap).
|
|
5
|
+
neurotypes: ["adhd", "audhd", "asd"]
|
|
6
|
+
status: stable
|
|
7
|
+
triggers:
|
|
8
|
+
- command: "/visualize"
|
|
9
|
+
- command: "/diagram"
|
|
10
|
+
- phrase: "draw this out"
|
|
11
|
+
- phrase: "make a diagram"
|
|
12
|
+
- phrase: "i can't see the structure"
|
|
13
|
+
- phrase: "make a mermaid chart of this"
|
|
14
|
+
- phrase: "show me the flow visually"
|
|
15
|
+
- phrase: "map out the relationships"
|
|
16
|
+
mcp_dependencies: []
|
|
17
|
+
profile_dependencies:
|
|
18
|
+
- preferences.motion # if "reduced", the diagram MUST have animation: false
|
|
19
|
+
license: AGPL-3.0-or-later
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# visual-organizer
|
|
23
|
+
|
|
24
|
+
Turns a wall of related ideas into a Mermaid diagram so the user can see structure instead of paragraphs. Pure formatting skill — no MCP calls in v0.1.0.
|
|
25
|
+
|
|
26
|
+
## Activation
|
|
27
|
+
|
|
28
|
+
Activate when any of the following holds:
|
|
29
|
+
|
|
30
|
+
1. The user invokes `/visualize` or `/diagram`.
|
|
31
|
+
2. The user says any of these (case-insensitive): "draw this out", "make a diagram", "make a mermaid chart of this", "show me the flow visually", "map out the relationships".
|
|
32
|
+
3. The user says they can't see the structure, can't hold it all in their head, or otherwise signals that prose isn't loading — e.g. "I can't see the structure", "I've lost the thread of this", "I can't picture how these connect". Treat these as a request for a structural view alongside the prose answer.
|
|
33
|
+
4. The user has just pasted a wall of interlinked items (≥ 6 distinct concepts, references between them) and a structural view would help. Use judgement; the prose answer still goes first. Offer the diagram, don't impose it.
|
|
34
|
+
|
|
35
|
+
The user picked the trigger. Respect it. Do not editorialise their state.
|
|
36
|
+
|
|
37
|
+
## Pick the diagram type
|
|
38
|
+
|
|
39
|
+
| Input shape | Diagram |
|
|
40
|
+
| ------------------------------------------------- | ----------------------------------------------- |
|
|
41
|
+
| Linear cause-and-effect, a process, or a pipeline | `flowchart TD` |
|
|
42
|
+
| Interactions between named actors over time | `sequenceDiagram` |
|
|
43
|
+
| Loose related concepts the user dumped in one go | `mindmap` |
|
|
44
|
+
| Branching decisions and consequences | `flowchart LR` with diamond `{decision?}` nodes |
|
|
45
|
+
|
|
46
|
+
If two fit, pick the one with fewer nodes. Cognitive load cap below is the tie-breaker.
|
|
47
|
+
|
|
48
|
+
## Generate the Mermaid block
|
|
49
|
+
|
|
50
|
+
1. Open a fenced ` ```mermaid ` code block. Close it cleanly.
|
|
51
|
+
2. Use 2-space indentation throughout.
|
|
52
|
+
3. Node IDs: short, no spaces, `camelCase` (e.g. `prRaised`, `staging`, `merge`).
|
|
53
|
+
4. Node labels: human-readable inside `[brackets]` (rectangles), `("parens")` (rounded), or `{braces}` (decisions).
|
|
54
|
+
5. Edge labels: `-- short label -->`. Keep them under five words.
|
|
55
|
+
6. Group with `subgraph name["Label"] ... end` when grouping clarifies; do not over-group.
|
|
56
|
+
|
|
57
|
+
## Required directives (every diagram)
|
|
58
|
+
|
|
59
|
+
Put both at the very top of the block, before any other content.
|
|
60
|
+
|
|
61
|
+
1. `%%{init: {'theme':'neutral'}}%%` — single neutral hue, matches the project palette.
|
|
62
|
+
2. If `profile.preferences.motion == "reduced"`, also add `%%{init: {'flowchart': {'animation': false}}}%%`.
|
|
63
|
+
|
|
64
|
+
The two init blocks can be merged into one when both apply. Either form is acceptable as long as both keys are honoured.
|
|
65
|
+
|
|
66
|
+
## Cognitive load cap
|
|
67
|
+
|
|
68
|
+
**Hard cap: 25 nodes per diagram.** If the input has more, split into two diagrams or roll up sub-concepts into a single node and surface the detail in prose underneath. This is the project default — do not exceed it without an explicit user instruction.
|
|
69
|
+
|
|
70
|
+
## Output structure (every invocation)
|
|
71
|
+
|
|
72
|
+
In this order, every time:
|
|
73
|
+
|
|
74
|
+
1. One sentence stating what the diagram represents. No preamble.
|
|
75
|
+
2. The fenced Mermaid block.
|
|
76
|
+
3. An accessible-description line directly below the block, in the exact format:
|
|
77
|
+
`_Accessible description: <plain-prose summary>_`
|
|
78
|
+
Length: 20–200 characters. Screen-reader users get the same content as sighted users.
|
|
79
|
+
4. Optional: 1–3 bullets calling out the most important relationships shown. Only include if they add information the diagram alone doesn't make obvious.
|
|
80
|
+
|
|
81
|
+
## Do not
|
|
82
|
+
|
|
83
|
+
- Do not produce a diagram **instead of** a prose answer when the user asked a question. The diagram is a structural view alongside prose, not a replacement.
|
|
84
|
+
- Do not editorialise the user's state ("looks like you're overwhelmed!"). Just turn the text into a diagram.
|
|
85
|
+
- Do not exceed 25 nodes without an explicit instruction.
|
|
86
|
+
- Do not omit the accessible-description line. It is mandatory.
|
|
87
|
+
- Do not use colour to convey meaning — the neutral theme is single-hue by design.
|
|
88
|
+
- Do not animate. The neutral theme plus `animation: false` (when set) keeps motion out.
|
|
89
|
+
|
|
90
|
+
# TODO: phase-2 enrichment — when `mcp-cognitive-graph` is available, optionally call `recall_entity` to populate node labels with the user's existing terminology and link concepts to prior decisions.
|
|
91
|
+
|
|
92
|
+
## Examples
|
|
93
|
+
|
|
94
|
+
See `tests/01-flowchart-from-prose.md`, `tests/02-sequence-from-meeting-notes.md`, `tests/03-mindmap-from-overwhelm-dump.md`, and `tests/04-flowchart-from-cant-see-structure.md` for full input → output pairs that the CI replays against a reference client.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readEnv } from "../lib/env.js";
|
|
2
2
|
import { runInit, type InitRunResult } from "./init.js";
|
|
3
3
|
import { runHostInstall as defaultRunHostInstall, type HostCommandResult } from "./host.js";
|
|
4
|
+
import { runInstallSkills as defaultRunInstallSkills, type InstallSkillsResult } from "./install-skills.js";
|
|
4
5
|
import type { ClientId } from "../types.js";
|
|
5
6
|
export type InstallerKind = "uv" | "pip";
|
|
6
7
|
export type InstallerChoice = InstallerKind | "auto";
|
|
@@ -18,6 +19,13 @@ export interface InstallAllOptions {
|
|
|
18
19
|
* command.
|
|
19
20
|
*/
|
|
20
21
|
readonly noNativeHost: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* When true, skip copying the per-neurotype skills into the client's
|
|
24
|
+
* personal-skills directory. Skills are installed by default so the
|
|
25
|
+
* happy path is one command; `--no-skills` opts out (mirrors
|
|
26
|
+
* `--no-native-host`).
|
|
27
|
+
*/
|
|
28
|
+
readonly noSkills: boolean;
|
|
21
29
|
/**
|
|
22
30
|
* Extra browser-extension ids to allow on the native host, on top of the
|
|
23
31
|
* published store ids. Needed for a locally-loaded unpacked build, whose
|
|
@@ -25,6 +33,12 @@ export interface InstallAllOptions {
|
|
|
25
33
|
*/
|
|
26
34
|
readonly extensionIds?: ReadonlyArray<string>;
|
|
27
35
|
}
|
|
36
|
+
export interface SkillsOutcome {
|
|
37
|
+
/** "installed" = ran, "skipped" = --no-skills or dry-run, "failed" = error/exit!=0. */
|
|
38
|
+
readonly status: "installed" | "skipped" | "failed";
|
|
39
|
+
readonly result?: InstallSkillsResult;
|
|
40
|
+
readonly error?: string;
|
|
41
|
+
}
|
|
28
42
|
export interface NativeHostOutcome {
|
|
29
43
|
/** "installed" = ran, "skipped" = --no-native-host or dry-run, "failed" = error caught. */
|
|
30
44
|
readonly status: "installed" | "skipped" | "failed";
|
|
@@ -49,6 +63,7 @@ export interface InstallAllResult {
|
|
|
49
63
|
readonly packages: ReadonlyArray<PackageOutcome>;
|
|
50
64
|
readonly initResult: InitRunResult | null;
|
|
51
65
|
readonly nativeHost: NativeHostOutcome;
|
|
66
|
+
readonly skills: SkillsOutcome;
|
|
52
67
|
readonly messages: ReadonlyArray<string>;
|
|
53
68
|
/** 0 = ok, 1 = install/path failure, 2 = init failure */
|
|
54
69
|
readonly exitCode: 0 | 1 | 2;
|
|
@@ -70,6 +85,12 @@ export interface InstallAllDependencies {
|
|
|
70
85
|
* touch the user's registry / config dirs.
|
|
71
86
|
*/
|
|
72
87
|
readonly runHostInstall?: typeof defaultRunHostInstall;
|
|
88
|
+
/**
|
|
89
|
+
* Override the skills install step. Defaults to the real
|
|
90
|
+
* `runInstallSkills` from ./install-skills.js. Tests inject a stub so
|
|
91
|
+
* they don't touch the user's ~/.claude/skills dir.
|
|
92
|
+
*/
|
|
93
|
+
readonly runInstallSkills?: typeof defaultRunInstallSkills;
|
|
73
94
|
}
|
|
74
95
|
export type SpawnFn = (command: string, args: ReadonlyArray<string>, options: {
|
|
75
96
|
readonly env?: NodeJS.ProcessEnv;
|
|
@@ -1 +1 @@
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AC,EAAE,OAAO,uBAAuB,CAAC;CAC5D;AAED,MAAM,MAAM,OAAO,GAAG,CACpB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAC3B,OAAO,EAAE;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAC1C,WAAW,CAAC;AAEjB,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CACxC;AAgCD,wBAAsB,aAAa,CACjC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,GAAE,sBAA2B,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAyL3B"}
|
|
@@ -6,6 +6,7 @@ import { spawnSync } from "node:child_process";
|
|
|
6
6
|
import { readEnv } from "../lib/env.js";
|
|
7
7
|
import { runInit } from "./init.js";
|
|
8
8
|
import { runHostInstall as defaultRunHostInstall, } from "./host.js";
|
|
9
|
+
import { runInstallSkills as defaultRunInstallSkills, } from "./install-skills.js";
|
|
9
10
|
const PACKAGES = [
|
|
10
11
|
{
|
|
11
12
|
pkg: "neurodock-mcp-chronometric",
|
|
@@ -33,6 +34,7 @@ export async function runInstallAll(options, deps = {}) {
|
|
|
33
34
|
const spawn = deps.spawn ?? defaultSpawn;
|
|
34
35
|
const init = deps.runInit ?? runInit;
|
|
35
36
|
const hostInstall = deps.runHostInstall ?? defaultRunHostInstall;
|
|
37
|
+
const skillsInstall = deps.runInstallSkills ?? defaultRunInstallSkills;
|
|
36
38
|
const messages = [];
|
|
37
39
|
// Phase 1: pick installer.
|
|
38
40
|
const installer = resolveInstaller(options.installer, env, spawn);
|
|
@@ -54,11 +56,18 @@ export async function runInstallAll(options, deps = {}) {
|
|
|
54
56
|
else {
|
|
55
57
|
messages.push("Would register the optional native-messaging host (browser extension <-> profile.yaml).");
|
|
56
58
|
}
|
|
59
|
+
if (options.noSkills) {
|
|
60
|
+
messages.push("Would skip the per-neurotype skills install (--no-skills).");
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
messages.push("Would install the per-neurotype skills into ~/.claude/skills (Claude Code / Claude Desktop).");
|
|
64
|
+
}
|
|
57
65
|
return {
|
|
58
66
|
installer: "dry-run",
|
|
59
67
|
packages: [],
|
|
60
68
|
initResult: null,
|
|
61
69
|
nativeHost: { status: "skipped" },
|
|
70
|
+
skills: { status: "skipped" },
|
|
62
71
|
messages,
|
|
63
72
|
exitCode: 0,
|
|
64
73
|
};
|
|
@@ -70,6 +79,7 @@ export async function runInstallAll(options, deps = {}) {
|
|
|
70
79
|
packages: [],
|
|
71
80
|
initResult: null,
|
|
72
81
|
nativeHost: { status: "skipped" },
|
|
82
|
+
skills: { status: "skipped" },
|
|
73
83
|
messages,
|
|
74
84
|
exitCode: 1,
|
|
75
85
|
};
|
|
@@ -121,6 +131,7 @@ export async function runInstallAll(options, deps = {}) {
|
|
|
121
131
|
packages: outcomes,
|
|
122
132
|
initResult: null,
|
|
123
133
|
nativeHost: { status: "skipped" },
|
|
134
|
+
skills: { status: "skipped" },
|
|
124
135
|
messages,
|
|
125
136
|
exitCode: 2,
|
|
126
137
|
};
|
|
@@ -130,6 +141,10 @@ export async function runInstallAll(options, deps = {}) {
|
|
|
130
141
|
// installs the browser extension, and surfacing a warning is friendlier
|
|
131
142
|
// than failing the whole "first-time install" command.
|
|
132
143
|
const nativeHost = installNativeHost(options, hostInstall, messages);
|
|
144
|
+
// Phase 3.6: install the per-neurotype skills (opt-out). Failure is
|
|
145
|
+
// non-fatal — the MCP servers are the core; skills are an enhancement —
|
|
146
|
+
// so a write hiccup in ~/.claude/skills should not fail the command.
|
|
147
|
+
const skills = await installSkills(options, skillsInstall, deps, messages);
|
|
133
148
|
// Phase 4: summary + suggested prompts.
|
|
134
149
|
const installedCount = outcomes.filter((o) => o.installed).length;
|
|
135
150
|
const onPathCount = outcomes.filter((o) => o.onPath).length;
|
|
@@ -151,6 +166,7 @@ export async function runInstallAll(options, deps = {}) {
|
|
|
151
166
|
: "pip"));
|
|
152
167
|
messages.push(" - Wired your MCP-aware clients (Claude Desktop / Claude Code / Cursor)");
|
|
153
168
|
messages.push(` - ${describeNativeHostBullet(nativeHost)}`);
|
|
169
|
+
messages.push(` - ${describeSkillsBullet(skills)}`);
|
|
154
170
|
messages.push("");
|
|
155
171
|
messages.push("Try one of these in your MCP client:");
|
|
156
172
|
for (const p of SUGGESTED_PROMPTS) {
|
|
@@ -164,10 +180,46 @@ export async function runInstallAll(options, deps = {}) {
|
|
|
164
180
|
packages: outcomes,
|
|
165
181
|
initResult,
|
|
166
182
|
nativeHost,
|
|
183
|
+
skills,
|
|
167
184
|
messages,
|
|
168
185
|
exitCode,
|
|
169
186
|
};
|
|
170
187
|
}
|
|
188
|
+
async function installSkills(options, skillsInstall, deps, messages) {
|
|
189
|
+
messages.push("");
|
|
190
|
+
if (options.noSkills) {
|
|
191
|
+
messages.push("Skipping skills install (--no-skills).");
|
|
192
|
+
return { status: "skipped" };
|
|
193
|
+
}
|
|
194
|
+
messages.push("Installing per-neurotype skills (Claude Code / Claude Desktop)...");
|
|
195
|
+
try {
|
|
196
|
+
const result = await skillsInstall({ client: options.client, dryRun: false, yes: options.yes }, deps.envOverrides ? { envOverrides: deps.envOverrides } : {});
|
|
197
|
+
for (const m of result.messages)
|
|
198
|
+
messages.push(` ${m}`);
|
|
199
|
+
return {
|
|
200
|
+
status: result.exitCode === 0 ? "installed" : "failed",
|
|
201
|
+
result,
|
|
202
|
+
...(result.exitCode !== 0
|
|
203
|
+
? { error: "skills install reported a non-zero exit" }
|
|
204
|
+
: {}),
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
catch (err) {
|
|
208
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
209
|
+
messages.push(` [warn] skills install failed: ${truncate(detail)}`);
|
|
210
|
+
messages.push(" This is optional — the MCP servers are wired regardless. Re-run 'neurodock install-skills' later.");
|
|
211
|
+
return { status: "failed", error: detail };
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function describeSkillsBullet(outcome) {
|
|
215
|
+
if (outcome.status === "installed") {
|
|
216
|
+
return "Installed the per-neurotype skills into ~/.claude/skills (Claude Code / Claude Desktop)";
|
|
217
|
+
}
|
|
218
|
+
if (outcome.status === "failed") {
|
|
219
|
+
return "Skills install failed (optional — re-run 'neurodock install-skills' later)";
|
|
220
|
+
}
|
|
221
|
+
return "Skipped the per-neurotype skills (optional — run 'neurodock install-skills' to add them)";
|
|
222
|
+
}
|
|
171
223
|
function installNativeHost(options, hostInstall, messages) {
|
|
172
224
|
messages.push("");
|
|
173
225
|
if (options.noNativeHost) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-all.js","sourceRoot":"","sources":["../../src/commands/install-all.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAoB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAsB,MAAM,WAAW,CAAC;AACxD,OAAO,EACL,cAAc,IAAI,qBAAqB,GAExC,MAAM,WAAW,CAAC;AAiGnB,MAAM,QAAQ,GAA+B;IAC3C;QACE,GAAG,EAAE,4BAA4B;QACjC,UAAU,EAAE,4BAA4B;KACzC;IACD;QACE,GAAG,EAAE,+BAA+B;QACpC,UAAU,EAAE,+BAA+B;KAC5C;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,UAAU,EAAE,iCAAiC;KAC9C;IACD,EAAE,GAAG,EAAE,2BAA2B,EAAE,UAAU,EAAE,2BAA2B,EAAE;IAC7E,EAAE,GAAG,EAAE,yBAAyB,EAAE,UAAU,EAAE,yBAAyB,EAA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,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;AACpE,CAAC;AAED,SAAS,YAAY,CACnB,OAAe,EACf,IAA2B,EAC3B,OAA6C;IAE7C,MAAM,CAAC,GAA6B,SAAS,CAAC,OAAO,EAAE,IAAgB,EAAE;QACvE,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG;QAC/B,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;QACjC,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IACH,OAAO;QACL,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;QACjD,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;QACjD,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACvC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { readEnv } from "../lib/env.js";
|
|
2
|
+
import type { ClientId } from "../types.js";
|
|
3
|
+
export interface InstallSkillsOptions {
|
|
4
|
+
/** Which client's personal-skills dir to target, or `all`. */
|
|
5
|
+
readonly client: ClientId | "all";
|
|
6
|
+
readonly dryRun: boolean;
|
|
7
|
+
readonly yes: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface InstallSkillsDependencies {
|
|
10
|
+
/** Override the environment snapshot (for tests). */
|
|
11
|
+
readonly envOverrides?: Parameters<typeof readEnv>[0];
|
|
12
|
+
/**
|
|
13
|
+
* Override where the bundled skills live. Defaults to the first existing
|
|
14
|
+
* candidate from `bundledSkillsCandidates`. Tests inject a fake source.
|
|
15
|
+
*/
|
|
16
|
+
readonly skillsSourceDir?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InstallSkillsResult {
|
|
19
|
+
readonly messages: ReadonlyArray<string>;
|
|
20
|
+
/** Number of (skill x client-target) copies written. */
|
|
21
|
+
readonly installed: number;
|
|
22
|
+
/** 0 = ok, 1 = no bundled skills found (packaging bug). */
|
|
23
|
+
readonly exitCode: 0 | 1;
|
|
24
|
+
}
|
|
25
|
+
export declare function runInstallSkills(options: InstallSkillsOptions, deps?: InstallSkillsDependencies): Promise<InstallSkillsResult>;
|
|
26
|
+
//# sourceMappingURL=install-skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-skills.d.ts","sourceRoot":"","sources":["../../src/commands/install-skills.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,OAAO,EAAoB,MAAM,eAAe,CAAC;AAS1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,KAAK,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,qDAAqD;IACrD,QAAQ,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CAC1B;AAUD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,oBAAoB,EAC7B,IAAI,GAAE,yBAA8B,GACnC,OAAO,CAAC,mBAAmB,CAAC,CAgF9B"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
* Copyright (c) 2026 NeuroDock contributors.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* `neurodock install-skills` — copy the bundled per-neurotype skills into
|
|
7
|
+
* the user's client personal-skills directory so Claude Code / Claude
|
|
8
|
+
* Desktop discover them.
|
|
9
|
+
*
|
|
10
|
+
* Why this exists:
|
|
11
|
+
*
|
|
12
|
+
* Marketplace/plugin users already get the skills bundled into the
|
|
13
|
+
* Claude Code plugin (see `scripts/sync-skills.mjs`). Users who install
|
|
14
|
+
* via `@neurodock/cli` only got the MCP servers wired — no skills. This
|
|
15
|
+
* command closes that gap by copying the skills the CLI tarball ships
|
|
16
|
+
* (under `dist/assets/skills/`) into `~/.claude/skills/neurodock-<name>/`.
|
|
17
|
+
*
|
|
18
|
+
* Target directories:
|
|
19
|
+
*
|
|
20
|
+
* - Claude Code -> ~/.claude/skills/ (personal skills)
|
|
21
|
+
* - Claude Desktop -> ~/.claude/skills/ (same personal-skills dir)
|
|
22
|
+
* - Cursor -> skipped (no skills system today)
|
|
23
|
+
*
|
|
24
|
+
* Idempotent: re-running overwrites/refreshes each `SKILL.md` atomically.
|
|
25
|
+
*/
|
|
26
|
+
import { mkdirSync } from "node:fs";
|
|
27
|
+
import { join } from "node:path";
|
|
28
|
+
import { atomicWriteOverwrite } from "../util/atomic-write.js";
|
|
29
|
+
import { readEnv } from "../lib/env.js";
|
|
30
|
+
import { bundledSkillsCandidates, clientSkillsDir, discoverBundledSkills, namespacedSkillDir, readIfExists, } from "../lib/skills.js";
|
|
31
|
+
/** Clients that have a personal-skills directory we can write to. */
|
|
32
|
+
const SKILLS_CAPABLE = [
|
|
33
|
+
"claude-code",
|
|
34
|
+
"claude-desktop",
|
|
35
|
+
];
|
|
36
|
+
const SKILLS_INCAPABLE = ["cursor"];
|
|
37
|
+
export async function runInstallSkills(options, deps = {}) {
|
|
38
|
+
const env = readEnv(deps.envOverrides ?? {});
|
|
39
|
+
const messages = [];
|
|
40
|
+
// 1. Locate the bundled skills.
|
|
41
|
+
const sourceDir = resolveSkillsSource(deps, env);
|
|
42
|
+
const skills = discoverBundledSkills(sourceDir);
|
|
43
|
+
if (skills.length === 0) {
|
|
44
|
+
messages.push("[install-skills] could not find any bundled skills.");
|
|
45
|
+
messages.push(" This is a packaging bug — the skills should ship with @neurodock/cli " +
|
|
46
|
+
"(under dist/assets/skills/). Re-install the CLI or run a fresh build.");
|
|
47
|
+
return { messages, installed: 0, exitCode: 1 };
|
|
48
|
+
}
|
|
49
|
+
// 2. Resolve which client target dirs to write to. We do NOT gate on the
|
|
50
|
+
// client config existing: skills live in ~/.claude/skills regardless of
|
|
51
|
+
// whether the MCP config file is present, and the dir is shared anyway.
|
|
52
|
+
const targets = resolveTargets(options.client);
|
|
53
|
+
// 3. Skipped clients (e.g. Cursor) — clear notice, never an error.
|
|
54
|
+
const skipped = resolveSkipped(options.client);
|
|
55
|
+
for (const s of skipped) {
|
|
56
|
+
messages.push(`Skipping ${s}: it has no skills system, so there is nowhere to install skills.`);
|
|
57
|
+
}
|
|
58
|
+
if (targets.length === 0) {
|
|
59
|
+
messages.push("No skills-capable client selected. Nothing to install.");
|
|
60
|
+
messages.push("Skills install into Claude Code / Claude Desktop's ~/.claude/skills directory.");
|
|
61
|
+
return { messages, installed: 0, exitCode: 0 };
|
|
62
|
+
}
|
|
63
|
+
// The personal-skills dir is shared between Claude Code and Claude Desktop,
|
|
64
|
+
// so de-duplicate the resolved paths to avoid copying the same files twice.
|
|
65
|
+
const skillsDirs = uniqueSkillsDirs(targets, env);
|
|
66
|
+
if (options.dryRun) {
|
|
67
|
+
messages.push("Dry run. No skills written.");
|
|
68
|
+
messages.push(`Would install ${skills.length} skill(s) into ${skillsDirs.length} location(s):`);
|
|
69
|
+
for (const dir of skillsDirs) {
|
|
70
|
+
messages.push(` ${dir}`);
|
|
71
|
+
for (const skill of skills) {
|
|
72
|
+
messages.push(` + ${join(`neurodock-${skill.name}`, "SKILL.md")}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return { messages, installed: 0, exitCode: 0 };
|
|
76
|
+
}
|
|
77
|
+
// 4. Install.
|
|
78
|
+
let installed = 0;
|
|
79
|
+
messages.push(`Installing ${skills.length} NeuroDock skill(s) into ${skillsDirs.length} location(s)...`);
|
|
80
|
+
for (const dir of skillsDirs) {
|
|
81
|
+
messages.push(` ${dir}`);
|
|
82
|
+
for (const skill of skills) {
|
|
83
|
+
const line = installSkill(skill, dir);
|
|
84
|
+
messages.push(` ${line.text}`);
|
|
85
|
+
if (line.ok)
|
|
86
|
+
installed += 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
messages.push("");
|
|
90
|
+
messages.push(`Summary: installed ${installed} of ${skills.length * skillsDirs.length} skill copy(ies) across ${skillsDirs.length} location(s).`);
|
|
91
|
+
messages.push("Restart Claude Code / Claude Desktop so it discovers the new skills.");
|
|
92
|
+
return { messages, installed, exitCode: 0 };
|
|
93
|
+
}
|
|
94
|
+
function installSkill(skill, skillsDir) {
|
|
95
|
+
// Read-and-catch (no existsSync-then-read): the source SKILL.md was
|
|
96
|
+
// confirmed readable during discovery, but re-read defensively.
|
|
97
|
+
const content = readIfExists(skill.skillMd);
|
|
98
|
+
if (content === null) {
|
|
99
|
+
return {
|
|
100
|
+
ok: false,
|
|
101
|
+
text: `[skip] neurodock-${skill.name} — source SKILL.md disappeared`,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
const destDir = namespacedSkillDir(skillsDir, skill.name);
|
|
105
|
+
const destFile = join(destDir, "SKILL.md");
|
|
106
|
+
try {
|
|
107
|
+
mkdirSync(destDir, { recursive: true });
|
|
108
|
+
atomicWriteOverwrite(destFile, content);
|
|
109
|
+
return { ok: true, text: `[ok] neurodock-${skill.name}` };
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
113
|
+
return {
|
|
114
|
+
ok: false,
|
|
115
|
+
text: `[fail] neurodock-${skill.name} — ${truncate(detail)}`,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function resolveSkillsSource(deps, env) {
|
|
120
|
+
if (deps.skillsSourceDir !== undefined)
|
|
121
|
+
return deps.skillsSourceDir;
|
|
122
|
+
// Pick the first candidate that actually contains a skill. We probe by
|
|
123
|
+
// discovery rather than existsSync to avoid a TOCTOU window.
|
|
124
|
+
for (const candidate of bundledSkillsCandidates(import.meta.url, env)) {
|
|
125
|
+
if (discoverBundledSkills(candidate).length > 0)
|
|
126
|
+
return candidate;
|
|
127
|
+
}
|
|
128
|
+
// Fall back to the first candidate; discovery there will return [] and the
|
|
129
|
+
// caller reports the packaging-bug message.
|
|
130
|
+
return bundledSkillsCandidates(import.meta.url, env)[0] ?? "";
|
|
131
|
+
}
|
|
132
|
+
function resolveTargets(client) {
|
|
133
|
+
if (client === "all")
|
|
134
|
+
return SKILLS_CAPABLE;
|
|
135
|
+
if (SKILLS_CAPABLE.includes(client))
|
|
136
|
+
return [client];
|
|
137
|
+
return [];
|
|
138
|
+
}
|
|
139
|
+
function resolveSkipped(client) {
|
|
140
|
+
if (client === "all")
|
|
141
|
+
return SKILLS_INCAPABLE;
|
|
142
|
+
if (SKILLS_INCAPABLE.includes(client))
|
|
143
|
+
return [client];
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
function uniqueSkillsDirs(clients, env) {
|
|
147
|
+
const seen = new Set();
|
|
148
|
+
const dirs = [];
|
|
149
|
+
for (const client of clients) {
|
|
150
|
+
const dir = clientSkillsDir(client, env);
|
|
151
|
+
if (dir === null)
|
|
152
|
+
continue;
|
|
153
|
+
if (seen.has(dir))
|
|
154
|
+
continue;
|
|
155
|
+
seen.add(dir);
|
|
156
|
+
dirs.push(dir);
|
|
157
|
+
}
|
|
158
|
+
return dirs;
|
|
159
|
+
}
|
|
160
|
+
function truncate(s, max = 120) {
|
|
161
|
+
const first = s.split("\n")[0] ?? "";
|
|
162
|
+
return first.length > max ? `${first.slice(0, max - 1)}…` : first;
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=install-skills.js.map
|