brainx-skill 1.0.9 → 1.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brainx-skill",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Portable BrainX Agent Skills for Claude Code, Codex, Cursor, Windsurf, Gemini CLI, and OpenCode",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -5,9 +5,24 @@ description: Use first for every BrainX modeling, simulation, training, review,
5
5
 
6
6
  # BrainX general guard
7
7
 
8
- ## Purpose and boundary
8
+ ## Never inspect BrainX packages in the venv. for knowledge, ONLY check presence
9
+
10
+ Treat BrainX packages in the active virtual environment only as execution dependencies, never as sources of modeling knowledge.
11
+
12
+ - **ONLY check presence.** Determine whether each required BrainX package is present, then stop inspecting the environment.
13
+ - **NEVER investigate installed content.** Do not enumerate package files, modules, symbols, signatures, docstrings, runtime definitions, or object internals.
14
+ - **NEVER read installed source code.** Do not open or read any BrainX source code in the virtual environment.
15
+
16
+
17
+ ## Study modeling skills and task-relevant scripts
18
+
19
+ 1. Treat the selected modeling skills as the authoritative guide to BrainX modeling, dive deep into the skill.
20
+ 2. Follow the skill's exact routing instructions. Open every reference that are likely relevant by the user's task.
21
+ 3. Identify the example scripts referenced by the skill or its routed references. Open and study every script that is highly related to the user's task.
22
+ 4. Trace each relevant script end to end.
23
+ 5. Derive the implementation from those canonical patterns, then adapt only the parts required by the user's scientific model.
24
+
9
25
 
10
- Open this guard before any package skill for every BrainX modeling task. First identify every modeling scale explicitly represented, then open the package skills that own those scales and keep this guard active as the cross-cutting implementation layer.
11
26
 
12
27
  ## Select modeling skills by represented scale
13
28
 
@@ -23,8 +38,6 @@ Select every row supported by the user's task. A single-scale task opens one mod
23
38
  | Cellular mechanisms coupled to aggregate neural-mass dynamics | BrainCell + BrainMass |
24
39
  | Cellular biophysics, point-neuron networks, and aggregate population dynamics interacting in one workflow | BrainCell + BrainPy-State + BrainMass |
25
40
 
26
- Use the finest explicitly modeled unit to distinguish adjacent scales: point neurons select BrainPy-State, explicit cellular mechanisms select BrainCell, and aggregate population variables select BrainMass.
27
-
28
41
  ## Write BrainX-native code
29
42
 
30
43
  Start from the scientific concept and use the selected BrainX skills to construct the workflow. Avoid raw NumPy or JAX unless at an explicit interoperability boundary or after verifying an API gap.
@@ -35,15 +48,21 @@ Use high-level APIs as the abstraction boundary: simulation code should state th
35
48
 
36
49
  | Need | Prefer |
37
50
  |---|---|
38
- | Physical values, array creation or structure, mathematical operations | BrainUnit quantities and `brainunit.math` |
39
- | Connectivity, encoding, inputs, initialization, integration, metrics, optimization, surrogate gradients, training, visualization | `braintools.conn`, `input`, `init`, `quad`, `metric`, `optim`, `surrogate`, `trainer`, or `visualize` |
40
- | Mutable model state, compilation, differentiation, batching, control flow, randomness | `brainstate.State`, `brainstate.nn.Module`, `brainstate.transform`, and `brainstate.random` |
41
- | Cells, events, networks, mass models, or traces | The corresponding BrainCell, BrainEvent, BrainPy-State, BrainMass, or BrainTrace abstraction |
51
+ | array creation or structure, mathematical operations | BrainUnit quantities and `brainunit.math` |
52
+ | Connectivity, encoding, inputs, initialization, integration, metrics, optimization, surrogate gradients, training, visualization | `braintools` |
53
+
42
54
 
43
55
  Do not let code grow around manual indexing, reshaping, reductions, equations, loops, or bookkeeping. Prefer one named BrainX operation or Module over a chain of generic primitives.
44
56
 
45
57
  Write custom logic only when it expresses model behavior that the ecosystem does not already provide. Verify the owning skill, reference, or official API page before using an unfamiliar name or signature.
46
58
 
59
+ ## Keep plotting code short without lowering figure quality
60
+
61
+ Use high-level `matplotlib.pyplot` APIs for standard scientific plots. Prefer a compact sequence of `plt.figure()`, `plt.plot()`, labeling, layout, and display calls over low-level Figure, Axes, Artist, or styling machinery when the high-level API expresses the same figure clearly.
62
+
63
+
64
+ Brevity applies to the code, not the figure's scientific content or visual quality.
65
+
47
66
 
48
67
  ## Transform stateful execution
49
68
 
@@ -55,7 +74,7 @@ Transform the complete stateful operation with `brainstate.transform` whenever p
55
74
  | `brainstate.transform.for_loop` | Run a fixed time or data sequence when iteration-to-iteration effects live in `State`; it slices leading input axes and stacks per-step outputs. |
56
75
  | `brainstate.transform.scan` | Run a sequence when an ordinary explicit carry must pass between iterations. |
57
76
 
58
- Do not use a Python loop for simulation timesteps, recurrent sequences, or other repeated State updates that should execute as one compiled operation. Keep Python loops for static Module construction, configuration, host-side orchestration, and debugging outside the transformed execution path.
77
+ Do not use a Python loop for simulation timesteps, recurrent sequences, or other repeated State updates that should execute as one compiled operation.
59
78
 
60
79
  Use raw JAX transformations only for pure array or PyTree functions that do not close over BrainState `State`.
61
80
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brainx-install
3
- description: "Manage BrainX Python package installation and package state: install, set up, upgrade, downgrade, pin, migrate, uninstall, or clean up BrainX; select CPU, CUDA 12, CUDA 13, or TPU package extras; and reconcile BrainX release, dependency, and virtual-environment compatibility. Use only for requests about installing or removing packages, package versions, dependency constraints, pip or virtual-environment setup, or device-specific package builds. Do not use for BrainX modeling, simulation, APIs, coding, application debugging, performance, or other general BrainX questions."
3
+ description: " Gently check whether the BrainX meta-package is installed in the intended Python environment; if it is absent, open this skill. use this skill to install, set up, upgrade, downgrade, pin, migrate, uninstall, or clean up BrainX."
4
4
  ---
5
5
 
6
6
  # BrainX Install
@@ -67,7 +67,7 @@ Determine whether the intended installation is for:
67
67
  - `cuda13`
68
68
  - `tpu`
69
69
 
70
- Do not treat detected hardware as the user's choice. If the target is unstated, implied, contradictory, or unclear, question the user directly and persistently until they explicitly choose one device target. Resolve whether they mean the current machine, a container, a remote host, a cluster node, or another deployment environment. Never infer CUDA 12 or CUDA 13 from GPU visibility alone; consider the NVIDIA driver, toolkit or container runtime, and the intended execution host.
70
+ Do not treat detected hardware as the user's choice. If the target is unstated, implied, contradictory, or unclear, question the user directly and persistently until they explicitly choose one device target.
71
71
 
72
72
  Reflect the understood requirement back to the user before release selection. Use wording such as:
73
73
 
@@ -161,7 +161,7 @@ Verification passes only when:
161
161
 
162
162
  Do not modify manifests, lockfiles, requirements files, or unrelated environments.
163
163
 
164
- ## 7. Report
164
+ ## 7. Report and Post-install handoff
165
165
 
166
166
  Report:
167
167
 
@@ -171,7 +171,10 @@ Report:
171
171
  - verification command output;
172
172
  - final status: `PASS` or `FAIL`, with the reason.
173
173
 
174
- For a pip failure, include the exit status and relevant stderr and state that verification was not run. For a verification failure, identify the failed condition. Report `PASS` only when both imports succeed and JAX sees the confirmed backend.
174
+ After reporting a `PASS`, explicitly tell the user:
175
+
176
+ > This session is for installation of the BrainX package. Installation is complete; Please open another codex chat so that the context is clean
177
+
175
178
 
176
179
  ## Official Commands to use
177
180