pi-skill-search 0.1.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.
Files changed (299) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/LICENSE +21 -0
  3. package/README.md +97 -0
  4. package/index.ts +163 -0
  5. package/package.json +48 -0
  6. package/skills/adaptyv/SKILL.md +92 -0
  7. package/skills/add-community-extension/SKILL.md +85 -0
  8. package/skills/aeon/SKILL.md +111 -0
  9. package/skills/ai-slop-cleaner/SKILL.md +118 -0
  10. package/skills/anndata/SKILL.md +83 -0
  11. package/skills/arboreto/SKILL.md +107 -0
  12. package/skills/ask/SKILL.md +55 -0
  13. package/skills/astropy/SKILL.md +30 -0
  14. package/skills/async-worker-recovery/SKILL.md +44 -0
  15. package/skills/autopilot/SKILL.md +63 -0
  16. package/skills/autoresearch/SKILL.md +64 -0
  17. package/skills/autoskill/SKILL.md +116 -0
  18. package/skills/babysit/SKILL.md +43 -0
  19. package/skills/benchling-integration/SKILL.md +106 -0
  20. package/skills/bgpt-paper-search/SKILL.md +67 -0
  21. package/skills/biopython/SKILL.md +29 -0
  22. package/skills/bioservices/SKILL.md +96 -0
  23. package/skills/brainstorming/SKILL.md +104 -0
  24. package/skills/cancel/SKILL.md +85 -0
  25. package/skills/ccg/SKILL.md +87 -0
  26. package/skills/celery-pipeline/SKILL.md +30 -0
  27. package/skills/cellxgene-census/SKILL.md +104 -0
  28. package/skills/child-pi-spawning/SKILL.md +85 -0
  29. package/skills/cirq/SKILL.md +113 -0
  30. package/skills/citation-management/SKILL.md +91 -0
  31. package/skills/clinical-decision-support/SKILL.md +117 -0
  32. package/skills/clinical-reports/SKILL.md +118 -0
  33. package/skills/clinical-trial/SKILL.md +28 -0
  34. package/skills/cobrapy/SKILL.md +116 -0
  35. package/skills/configure-notifications/SKILL.md +85 -0
  36. package/skills/consciousness-council/SKILL.md +120 -0
  37. package/skills/context-artifact-hygiene/SKILL.md +85 -0
  38. package/skills/context-mode-ops/SKILL.md +87 -0
  39. package/skills/dask/SKILL.md +85 -0
  40. package/skills/database-lookup/SKILL.md +118 -0
  41. package/skills/datamol/SKILL.md +108 -0
  42. package/skills/debug/SKILL.md +32 -0
  43. package/skills/deep-dive/SKILL.md +114 -0
  44. package/skills/deep-interview/SKILL.md +90 -0
  45. package/skills/deepchem/SKILL.md +117 -0
  46. package/skills/deepinit/SKILL.md +100 -0
  47. package/skills/deeptools/SKILL.md +118 -0
  48. package/skills/delegation-patterns/SKILL.md +56 -0
  49. package/skills/depmap/SKILL.md +94 -0
  50. package/skills/dhdna-profiler/SKILL.md +86 -0
  51. package/skills/diffdock/SKILL.md +101 -0
  52. package/skills/dispatching-parallel-agents/SKILL.md +119 -0
  53. package/skills/dnanexus-integration/SKILL.md +118 -0
  54. package/skills/do/SKILL.md +48 -0
  55. package/skills/docker-sandbox/SKILL.md +29 -0
  56. package/skills/docx/SKILL.md +119 -0
  57. package/skills/esm/SKILL.md +116 -0
  58. package/skills/etetoolkit/SKILL.md +103 -0
  59. package/skills/event-log-tracing/SKILL.md +85 -0
  60. package/skills/exa-search/SKILL.md +72 -0
  61. package/skills/executing-plans/SKILL.md +69 -0
  62. package/skills/exploratory-data-analysis/SKILL.md +118 -0
  63. package/skills/external-context/SKILL.md +80 -0
  64. package/skills/fastapi/SKILL.md +30 -0
  65. package/skills/finishing-a-development-branch/SKILL.md +106 -0
  66. package/skills/flowio/SKILL.md +114 -0
  67. package/skills/fluidsim/SKILL.md +108 -0
  68. package/skills/generate-image/SKILL.md +108 -0
  69. package/skills/geniml/SKILL.md +117 -0
  70. package/skills/geomaster/SKILL.md +109 -0
  71. package/skills/geopandas/SKILL.md +114 -0
  72. package/skills/get-available-resources/SKILL.md +100 -0
  73. package/skills/gget/SKILL.md +111 -0
  74. package/skills/ginkgo-cloud-lab/SKILL.md +52 -0
  75. package/skills/git-master/SKILL.md +85 -0
  76. package/skills/glycoengineering/SKILL.md +104 -0
  77. package/skills/gtars/SKILL.md +104 -0
  78. package/skills/hackernews-frontpage/SKILL.md +46 -0
  79. package/skills/histolab/SKILL.md +98 -0
  80. package/skills/how-it-works/SKILL.md +25 -0
  81. package/skills/hud/SKILL.md +86 -0
  82. package/skills/hugging-science/SKILL.md +93 -0
  83. package/skills/huggingface/SKILL.md +30 -0
  84. package/skills/hypogenic/SKILL.md +107 -0
  85. package/skills/hypothesis-generation/SKILL.md +118 -0
  86. package/skills/imaging-data-commons/SKILL.md +119 -0
  87. package/skills/infographics/SKILL.md +102 -0
  88. package/skills/iso-13485-certification/SKILL.md +114 -0
  89. package/skills/knowledge-agent/SKILL.md +83 -0
  90. package/skills/labarchive-integration/SKILL.md +98 -0
  91. package/skills/lamindb/SKILL.md +119 -0
  92. package/skills/landsat/SKILL.md +29 -0
  93. package/skills/latchbio-integration/SKILL.md +118 -0
  94. package/skills/latex-posters/SKILL.md +112 -0
  95. package/skills/learn-codebase/SKILL.md +24 -0
  96. package/skills/learner/SKILL.md +118 -0
  97. package/skills/literature-review/SKILL.md +118 -0
  98. package/skills/live-agent-lifecycle/SKILL.md +85 -0
  99. package/skills/mailbox-interactive/SKILL.md +85 -0
  100. package/skills/make-plan/SKILL.md +59 -0
  101. package/skills/markdown-mermaid-writing/SKILL.md +118 -0
  102. package/skills/market-research-reports/SKILL.md +119 -0
  103. package/skills/markitdown/SKILL.md +111 -0
  104. package/skills/markitdown-docs/SKILL.md +28 -0
  105. package/skills/matchms/SKILL.md +91 -0
  106. package/skills/matlab/SKILL.md +118 -0
  107. package/skills/matplotlib/SKILL.md +30 -0
  108. package/skills/mcp-setup/SKILL.md +84 -0
  109. package/skills/medchem/SKILL.md +109 -0
  110. package/skills/mem-search/SKILL.md +96 -0
  111. package/skills/modal/SKILL.md +104 -0
  112. package/skills/model-routing-context/SKILL.md +85 -0
  113. package/skills/molecular-dynamics/SKILL.md +116 -0
  114. package/skills/molfeat/SKILL.md +110 -0
  115. package/skills/multi-perspective-review/SKILL.md +85 -0
  116. package/skills/networkx/SKILL.md +111 -0
  117. package/skills/neurokit2/SKILL.md +114 -0
  118. package/skills/neuropixels-analysis/SKILL.md +112 -0
  119. package/skills/nilearn/SKILL.md +29 -0
  120. package/skills/observability-reliability/SKILL.md +43 -0
  121. package/skills/omc-doctor/SKILL.md +86 -0
  122. package/skills/omc-reference/SKILL.md +119 -0
  123. package/skills/omc-setup/SKILL.md +82 -0
  124. package/skills/omc-teams/SKILL.md +81 -0
  125. package/skills/omero-integration/SKILL.md +111 -0
  126. package/skills/open-notebook/SKILL.md +100 -0
  127. package/skills/openephys/SKILL.md +28 -0
  128. package/skills/opentrons-integration/SKILL.md +110 -0
  129. package/skills/optimize-for-gpu/SKILL.md +119 -0
  130. package/skills/orchestration/SKILL.md +85 -0
  131. package/skills/ownership-session-security/SKILL.md +43 -0
  132. package/skills/paper-lookup/SKILL.md +119 -0
  133. package/skills/paperzilla/SKILL.md +114 -0
  134. package/skills/parallel-web/SKILL.md +64 -0
  135. package/skills/pathfinder/SKILL.md +114 -0
  136. package/skills/pathml/SKILL.md +98 -0
  137. package/skills/pdf/SKILL.md +113 -0
  138. package/skills/peer-review/SKILL.md +119 -0
  139. package/skills/pennylane/SKILL.md +119 -0
  140. package/skills/phylogenetics/SKILL.md +102 -0
  141. package/skills/pi-extension-lifecycle/SKILL.md +41 -0
  142. package/skills/plan/SKILL.md +66 -0
  143. package/skills/polars/SKILL.md +114 -0
  144. package/skills/polars-bio/SKILL.md +84 -0
  145. package/skills/pptx/SKILL.md +118 -0
  146. package/skills/pptx-posters/SKILL.md +112 -0
  147. package/skills/primekg/SKILL.md +97 -0
  148. package/skills/project-session-manager/SKILL.md +85 -0
  149. package/skills/protocolsio-integration/SKILL.md +119 -0
  150. package/skills/pubmed-search/SKILL.md +29 -0
  151. package/skills/pufferlib/SKILL.md +103 -0
  152. package/skills/pydeseq2/SKILL.md +106 -0
  153. package/skills/pydicom/SKILL.md +115 -0
  154. package/skills/pyhealth/SKILL.md +117 -0
  155. package/skills/pylabrobot/SKILL.md +100 -0
  156. package/skills/pymatgen/SKILL.md +28 -0
  157. package/skills/pymc/SKILL.md +108 -0
  158. package/skills/pymoo/SKILL.md +90 -0
  159. package/skills/pyopenms/SKILL.md +119 -0
  160. package/skills/pysam/SKILL.md +118 -0
  161. package/skills/pyspark/SKILL.md +30 -0
  162. package/skills/pytdc/SKILL.md +102 -0
  163. package/skills/pytorch/SKILL.md +31 -0
  164. package/skills/pytorch-lightning/SKILL.md +119 -0
  165. package/skills/pyzotero/SKILL.md +104 -0
  166. package/skills/qiskit/SKILL.md +119 -0
  167. package/skills/qutip/SKILL.md +111 -0
  168. package/skills/ralph/SKILL.md +23 -0
  169. package/skills/ralplan/SKILL.md +105 -0
  170. package/skills/rdflib/SKILL.md +29 -0
  171. package/skills/rdkit/SKILL.md +30 -0
  172. package/skills/read-only-explorer/SKILL.md +85 -0
  173. package/skills/receiving-code-review/SKILL.md +103 -0
  174. package/skills/release/SKILL.md +117 -0
  175. package/skills/remember/SKILL.md +39 -0
  176. package/skills/requesting-code-review/SKILL.md +85 -0
  177. package/skills/requirements-to-task-packet/SKILL.md +65 -0
  178. package/skills/research-grants/SKILL.md +118 -0
  179. package/skills/research-lookup/SKILL.md +117 -0
  180. package/skills/research-reproducibility/SKILL.md +28 -0
  181. package/skills/resource-discovery-config/SKILL.md +43 -0
  182. package/skills/rowan/SKILL.md +100 -0
  183. package/skills/runtime-state-reader/SKILL.md +46 -0
  184. package/skills/safe-bash/SKILL.md +85 -0
  185. package/skills/scanpy/SKILL.md +32 -0
  186. package/skills/scholar-evaluation/SKILL.md +115 -0
  187. package/skills/scientific-brainstorming/SKILL.md +118 -0
  188. package/skills/scientific-critical-thinking/SKILL.md +119 -0
  189. package/skills/scientific-schematics/SKILL.md +116 -0
  190. package/skills/scientific-slides/SKILL.md +117 -0
  191. package/skills/scientific-visualization/SKILL.md +109 -0
  192. package/skills/scientific-writing/SKILL.md +119 -0
  193. package/skills/scikit-bio/SKILL.md +92 -0
  194. package/skills/scikit-learn/SKILL.md +99 -0
  195. package/skills/scikit-survival/SKILL.md +110 -0
  196. package/skills/sciomc/SKILL.md +86 -0
  197. package/skills/scvelo/SKILL.md +106 -0
  198. package/skills/scvi-tools/SKILL.md +114 -0
  199. package/skills/seaborn/SKILL.md +97 -0
  200. package/skills/secure-agent-orchestration-review/SKILL.md +47 -0
  201. package/skills/self-improve/SKILL.md +119 -0
  202. package/skills/semantic-compression/SKILL.md +62 -0
  203. package/skills/setup/SKILL.md +42 -0
  204. package/skills/shap/SKILL.md +103 -0
  205. package/skills/simpy/SKILL.md +116 -0
  206. package/skills/skill/SKILL.md +117 -0
  207. package/skills/skill-search/SKILL.md +67 -0
  208. package/skills/skillify/SKILL.md +46 -0
  209. package/skills/smart-explore/SKILL.md +94 -0
  210. package/skills/sqlite-pandas/SKILL.md +30 -0
  211. package/skills/stable-baselines3/SKILL.md +86 -0
  212. package/skills/state-mutation-locking/SKILL.md +44 -0
  213. package/skills/statistical-analysis/SKILL.md +108 -0
  214. package/skills/statsmodels/SKILL.md +29 -0
  215. package/skills/subagent-driven-development/SKILL.md +89 -0
  216. package/skills/sympy/SKILL.md +115 -0
  217. package/skills/system-prompts/SKILL.md +116 -0
  218. package/skills/systematic-debugging/SKILL.md +119 -0
  219. package/skills/team/SKILL.md +85 -0
  220. package/skills/test-driven-development/SKILL.md +84 -0
  221. package/skills/tiledbvcf/SKILL.md +119 -0
  222. package/skills/timeline-report/SKILL.md +85 -0
  223. package/skills/timesfm-forecasting/SKILL.md +112 -0
  224. package/skills/torch-geometric/SKILL.md +118 -0
  225. package/skills/torchdrug/SKILL.md +118 -0
  226. package/skills/trace/SKILL.md +118 -0
  227. package/skills/transformers/SKILL.md +110 -0
  228. package/skills/treatment-plans/SKILL.md +119 -0
  229. package/skills/ui-render-performance/SKILL.md +41 -0
  230. package/skills/ultragoal/SKILL.md +63 -0
  231. package/skills/ultraqa/SKILL.md +85 -0
  232. package/skills/ultrawork/SKILL.md +20 -0
  233. package/skills/umap-learn/SKILL.md +119 -0
  234. package/skills/usfiscaldata/SKILL.md +118 -0
  235. package/skills/using-git-worktrees/SKILL.md +112 -0
  236. package/skills/using-superpowers/SKILL.md +85 -0
  237. package/skills/using-vetc/SKILL.md +92 -0
  238. package/skills/vaex/SKILL.md +111 -0
  239. package/skills/venue-templates/SKILL.md +113 -0
  240. package/skills/verification-before-completion/SKILL.md +88 -0
  241. package/skills/verification-before-done/SKILL.md +68 -0
  242. package/skills/verify/SKILL.md +33 -0
  243. package/skills/version-bump/SKILL.md +54 -0
  244. package/skills/vetc-analyze-ba/SKILL.md +117 -0
  245. package/skills/vetc-analyze-codebase/SKILL.md +118 -0
  246. package/skills/vetc-api-design/SKILL.md +103 -0
  247. package/skills/vetc-brainstorming/SKILL.md +116 -0
  248. package/skills/vetc-change-proposal/SKILL.md +111 -0
  249. package/skills/vetc-cicd/SKILL.md +113 -0
  250. package/skills/vetc-continuous-learning/SKILL.md +115 -0
  251. package/skills/vetc-deep-interview/SKILL.md +103 -0
  252. package/skills/vetc-docgen/SKILL.md +108 -0
  253. package/skills/vetc-frontend-patterns/SKILL.md +99 -0
  254. package/skills/vetc-iterative-retrieval/SKILL.md +110 -0
  255. package/skills/vetc-java-patterns/SKILL.md +113 -0
  256. package/skills/vetc-meta-skill-creator/SKILL.md +99 -0
  257. package/skills/vetc-oracle-patterns/SKILL.md +109 -0
  258. package/skills/vetc-performance-testing/SKILL.md +104 -0
  259. package/skills/vetc-pr-response/SKILL.md +106 -0
  260. package/skills/vetc-ralph/SKILL.md +108 -0
  261. package/skills/vetc-ralplan/SKILL.md +116 -0
  262. package/skills/vetc-receiving-review/SKILL.md +106 -0
  263. package/skills/vetc-reconcile-patterns/SKILL.md +117 -0
  264. package/skills/vetc-refactoring/SKILL.md +96 -0
  265. package/skills/vetc-runbook/SKILL.md +118 -0
  266. package/skills/vetc-sast/SKILL.md +118 -0
  267. package/skills/vetc-sdlc/SKILL.md +97 -0
  268. package/skills/vetc-security/SKILL.md +117 -0
  269. package/skills/vetc-spec-driven/SKILL.md +111 -0
  270. package/skills/vetc-spec-quality/SKILL.md +117 -0
  271. package/skills/vetc-systematic-debugging/SKILL.md +74 -0
  272. package/skills/vetc-tdd/SKILL.md +96 -0
  273. package/skills/vetc-thinking-pm/SKILL.md +110 -0
  274. package/skills/vetc-ui-visual-qa/SKILL.md +117 -0
  275. package/skills/vetc-verify/SKILL.md +101 -0
  276. package/skills/visual-verdict/SKILL.md +59 -0
  277. package/skills/what-if-oracle/SKILL.md +87 -0
  278. package/skills/widget-rendering/SKILL.md +85 -0
  279. package/skills/wiki/SKILL.md +69 -0
  280. package/skills/workspace-isolation/SKILL.md +85 -0
  281. package/skills/worktree-isolation/SKILL.md +85 -0
  282. package/skills/wowerpoint/SKILL.md +101 -0
  283. package/skills/writer-memory/SKILL.md +82 -0
  284. package/skills/writing-plans/SKILL.md +115 -0
  285. package/skills/writing-skills/SKILL.md +115 -0
  286. package/skills/xgboost/SKILL.md +29 -0
  287. package/skills/xgboost-ts/SKILL.md +28 -0
  288. package/skills/xlsx/SKILL.md +111 -0
  289. package/skills/zarr-python/SKILL.md +101 -0
  290. package/src/categories.ts +383 -0
  291. package/src/format.ts +104 -0
  292. package/src/indexer.ts +101 -0
  293. package/src/proactive.ts +51 -0
  294. package/src/scanner.ts +85 -0
  295. package/src/search.ts +89 -0
  296. package/src/strip.ts +29 -0
  297. package/src/synonyms.ts +83 -0
  298. package/src/text.ts +118 -0
  299. package/src/types.ts +64 -0
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: stable-baselines3
3
+ description: Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API. Use for standard RL experiments, quick prototyping, and well-documented algorithm implementations. Best for single-agent RL with Gymnasium environments. For high-performance parallel training, multi-agent systems, or custom vectorized environments, use pufferlib instead.
4
+ ---
5
+
6
+ # Stable Baselines3
7
+
8
+ ## Overview
9
+
10
+ Stable Baselines3 (SB3) is a PyTorch-based library providing reliable implementations of reinforcement learning algorithms. This skill provides comprehensive guidance for training RL agents, creating custom environments, implementing callbacks, and optimizing training workflows using SB3's unified API.
11
+
12
+ ## Core Capabilities
13
+
14
+ ### 1. Training RL Agents
15
+
16
+ **Basic Training Pattern:**
17
+
18
+ ```python
19
+ import gymnasium as gym
20
+ from stable_baselines3 import PPO
21
+
22
+ # Create environment
23
+ env = gym.make("CartPole-v1")
24
+
25
+ # Initialize agent
26
+ model = PPO("MlpPolicy", env, verbose=1)
27
+
28
+ # Train the agent
29
+ model.learn(total_timesteps=10000)
30
+
31
+ # Save the model
32
+ model.save("ppo_cartpole")
33
+
34
+ # Load the model (without prior instantiation)
35
+ model = PPO.load("ppo_cartpole", env=env)
36
+ ```
37
+
38
+ **Important Notes:**
39
+ - `total_timesteps` is a lower bound; actual training may exceed this due to batch collection
40
+ - Use `model.load()` as a static method, not on an existing instance
41
+ - The replay buffer is NOT saved with the model to save space
42
+
43
+ **Algorithm Selection:**
44
+ Use `(see docs)` for detailed algorithm characteristics and selection guidance. Quick reference:
45
+ - **PPO/A2C**: General-purpose, supports all action space types, good for multiprocessing
46
+ - **SAC/TD3**: Continuous control, off-policy, sample-efficient
47
+ - **DQN**: Discrete actions, off-policy
48
+ - **HER**: Goal-conditioned tasks
49
+
50
+ See `scripts/train_rl_agent.py` for a complete training template with best practices.
51
+
52
+ ### 2. Custom Environments
53
+
54
+ **Requirements:**
55
+ Custom environments must inherit from `gymnasium.Env` and implement:
56
+ - `__init__()`: Define action_space and observation_space
57
+ - `reset(seed, options)`: Return initial observation and info dict
58
+ - `step(action)`: Return observation, reward, terminated, truncated, info
59
+ - `render()`: Visualization (optional)
60
+ - `close()`: Cleanup resources
61
+
62
+ **Key Constraints:**
63
+ - Image observations must be `np.uint8` in range [0, 255]
64
+ - Use channel-first format when possible (channels, height, width)
65
+ - SB3 normalizes images automatically by dividing by 255
66
+ - Set `normalize_images=False` in policy_kwargs if pre-normalized
67
+
68
+ ### 3. Vectorized Environments
69
+
70
+ **Purpose:**
71
+ Vectorized environments run multiple environment instances in parallel, accelerating training and enabling certain wrappers (frame-stacking, normalization).
72
+
73
+ **Types:**
74
+ - **DummyVecEnv**: Sequential execution on current process (for lightweight environments)
75
+ - **SubprocVecEnv**: Parallel execution across processes (for compute-heavy environments)
76
+
77
+ **Quick Setup:**
78
+ ```python
79
+ from stable_baselines3.common.env_util import make_vec_env
80
+
81
+ # Create 4 parallel environments
82
+ env = make_vec_env("CartPole-v1", n_envs=4, vec_env_cls=SubprocVecEnv)
83
+
84
+ model = PPO("MlpPolicy", env, verbose=1)
85
+ model.learn(total_timesteps=25000)
86
+ ```
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: state-mutation-locking
3
+ description: Durable state mutation and locking workflow. Use when changing manifests, tasks, mailbox, claims, events, stale reconciliation, recovery, cancel/respond/resume, or retry logic.
4
+ ---
5
+
6
+
7
+ # state-mutation-locking
8
+
9
+ Use this skill before modifying pi-crew run state.
10
+
11
+ ## Source patterns distilled
12
+
13
+ - `src/state/locks.ts` — run-level sync/async locks
14
+ - `src/state/state-store.ts` — manifest/tasks persistence
15
+ - `src/state/contracts.ts` — allowed status transitions
16
+ - `src/state/mailbox.ts`, `src/state/task-claims.ts`, `src/state/atomic-write.ts`
17
+ - `src/runtime/crash-recovery.ts`, `src/runtime/stale-reconciler.ts`, `src/runtime/team-runner.ts`
18
+
19
+ ## Rules
20
+
21
+ - Mutations to a run's `manifest.json`, `tasks.json`, mailbox delivery state, claims, or recovery status must be protected by a run lock when concurrent actions are possible.
22
+ - Re-read manifest/tasks inside the lock before making a decision; pre-lock reads are only for locating the run.
23
+ - Persist with atomic write helpers (`atomicWriteJson`, async variants, or state-store helpers). Do not partially write JSON files.
24
+ - Respect status contracts. Do not transition terminal tasks/runs unless the action explicitly supports force semantics.
25
+ - Separate analysis from persistence: pure reconcilers should return intended repaired state; locked callers should persist it.
26
+ - In retry/resume paths, reload fresh task status immediately before execution and skip if the task is no longer retryable/runnable.
27
+ - Include event-log entries for externally visible state changes.
28
+
29
+ ## Anti-patterns
30
+
31
+ - Reading state, waiting/doing async work, then writing the old copy.
32
+ - Updating `tasks.json` from a reconciler or watcher without a lock.
33
+ - Cancelling/responding to runs owned by another session.
34
+ - Using `fs.writeFileSync` for JSON state outside atomic helpers.
35
+
36
+ ## Verification
37
+
38
+ ```bash
39
+ cd pi-crew
40
+ npx tsc --noEmit
41
+ node --experimental-strip-types --test test/unit/cancel-ownership.test.ts test/unit/respond-tool.test.ts test/unit/stale-reconciler.test.ts test/unit/api-claim.test.ts
42
+ npm test
43
+ ```
44
+
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: statistical-analysis
3
+ description: Guided statistical analysis with test selection and reporting. Use when you need help choosing appropriate tests for your data, assumption checking, power analysis, and APA-formatted results. Best for academic research reporting, test selection guidance. For implementing specific models programmatically use statsmodels.
4
+ ---
5
+
6
+ # Statistical Analysis
7
+
8
+ ## Overview
9
+
10
+ Statistical analysis is a systematic process for testing hypotheses and quantifying relationships. Conduct hypothesis tests (t-test, ANOVA, chi-square), regression, correlation, and Bayesian analyses with assumption checks and APA reporting. Apply this skill for academic research.
11
+
12
+ ## When to Use This Skill
13
+
14
+ This skill should be used when:
15
+ - Conducting statistical hypothesis tests (t-tests, ANOVA, chi-square)
16
+ - Performing regression or correlation analyses
17
+ - Running Bayesian statistical analyses
18
+ - Checking statistical assumptions and diagnostics
19
+ - Calculating effect sizes and conducting power analyses
20
+ - Reporting statistical results in APA format
21
+ - Analyzing experimental or observational data for research
22
+
23
+ ---
24
+
25
+ ## Core Capabilities
26
+
27
+ ### 1. Test Selection and Planning
28
+ - Choose appropriate statistical tests based on research questions and data characteristics
29
+ - Conduct a priori power analyses to determine required sample sizes
30
+ - Plan analysis strategies including multiple comparison corrections
31
+
32
+ ### 2. Assumption Checking
33
+ - Automatically verify all relevant assumptions before running tests
34
+ - Provide diagnostic visualizations (Q-Q plots, residual plots, box plots)
35
+ - Recommend remedial actions when assumptions are violated
36
+
37
+ ### 3. Statistical Testing
38
+ - Hypothesis testing: t-tests, ANOVA, chi-square, non-parametric alternatives
39
+ - Regression: linear, multiple, logistic, with diagnostics
40
+ - Correlations: Pearson, Spearman, with confidence intervals
41
+ - Bayesian alternatives: Bayesian t-tests, ANOVA, regression with Bayes Factors
42
+
43
+ ### 4. Effect Sizes and Interpretation
44
+ - Calculate and interpret appropriate effect sizes for all analyses
45
+ - Provide confidence intervals for effect estimates
46
+ - Distinguish statistical from practical significance
47
+
48
+ ### 5. Professional Reporting
49
+ - Generate APA-style statistical reports
50
+ - Create publication-ready figures and tables
51
+ - Provide complete interpretation with all required statistics
52
+
53
+ ---
54
+
55
+ ## Workflow Decision Tree
56
+
57
+ Use this decision tree to determine your analysis path:
58
+
59
+ ```
60
+ START
61
+
62
+ ├─ Need to SELECT a statistical test?
63
+ │ └─ YES → See "Test Selection Guide"
64
+ │ └─ NO → Continue
65
+
66
+ ├─ Ready to check ASSUMPTIONS?
67
+ │ └─ YES → See "Assumption Checking"
68
+ │ └─ NO → Continue
69
+
70
+
71
+ ## Test Selection Guide
72
+
73
+ ### Quick Reference: Choosing the Right Test
74
+
75
+ Use `(see docs)` for comprehensive guidance. Quick reference:
76
+
77
+ **Comparing Two Groups:**
78
+ - Independent, continuous, normal → Independent t-test
79
+ - Independent, continuous, non-normal → Mann-Whitney U test
80
+ - Paired, continuous, normal → Paired t-test
81
+ - Paired, continuous, non-normal → Wilcoxon signed-rank test
82
+ - Binary outcome → Chi-square or Fisher's exact test
83
+
84
+ **Comparing 3+ Groups:**
85
+ - Independent, continuous, normal → One-way ANOVA
86
+ - Independent, continuous, non-normal → Kruskal-Wallis test
87
+ - Paired, continuous, normal → Repeated measures ANOVA
88
+
89
+ ## Assumption Checking
90
+
91
+ ### Systematic Assumption Verification
92
+
93
+ **ALWAYS check assumptions before interpreting test results.**
94
+
95
+ Use the provided `scripts/assumption_checks.py` module for automated checking:
96
+
97
+ ```python
98
+ from scripts.assumption_checks import comprehensive_assumption_check
99
+
100
+ # Comprehensive check with visualizations
101
+ results = comprehensive_assumption_check(
102
+ data=df,
103
+ value_col='score',
104
+ group_col='group', # Optional: for group comparisons
105
+ alpha=0.05
106
+ )
107
+
108
+
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: statsmodels
3
+ description: Statistical modeling, hypothesis testing, and econometric analysis. Use when fitting linear regression, GLM, time series forecasting (ARIMA, SARIMAX), ANOVA, or performing statistical tests. Trigger on imports of statsmodels, ols, arima, or mentions of p-value, confidence interval, statistical significance, regression analysis.
4
+ ---
5
+ # statsmodels
6
+
7
+ Use this skill for statistical analysis and modeling.
8
+
9
+ ## Core patterns
10
+
11
+ - **OLS**: `sm.OLS(y, X).fit()` → `result.summary()`, `result.params`, `result.pvalues`.
12
+ - **GLM**: `sm.GLM(y, X, family=sm.families.Gaussian()).fit()`.
13
+ - **Time series**: `SARIMAX(data, order=(p,d,q), seasonal_order=(P,D,Q,s)).fit()`.
14
+ - **Tests**: `sm.stats.anova_lm()`, `sm.stats.normal_ad()`, `sm.tsa.stattools.adfuller()`.
15
+ - **Prediction**: `result.get_prediction(new_X).conf_int(alpha=0.05)`.
16
+
17
+ ## Rules
18
+
19
+ - Always add constant: `X = sm.add_constant(X)` for intercept term.
20
+ - Check assumptions: residuals normality, homoscedasticity, VIF for multicollinearity.
21
+ - Use `sm.stats.diagnostic.acorr_ljungbox()` for autocorrelation in time series.
22
+
23
+ ## Anti-patterns
24
+
25
+ - Don't interpret p-values without checking model assumptions.
26
+ - Don't use OLS for time series without testing stationarity first.
27
+ - Don't ignore confidence intervals — point estimates are incomplete.
28
+
29
+
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: subagent-driven-development
3
+ description: Use when executing implementation plans with independent tasks in the current session
4
+ ---
5
+
6
+ # Subagent-Driven Development
7
+
8
+ Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
9
+
10
+ **Why subagents:** You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
11
+
12
+ **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
13
+
14
+ **Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
15
+
16
+ ## When to Use
17
+
18
+ ```dot
19
+ digraph when_to_use {
20
+ "Have implementation plan?" [shape=diamond];
21
+ "Tasks mostly independent?" [shape=diamond];
22
+ "Stay in this session?" [shape=diamond];
23
+ "subagent-driven-development" [shape=box];
24
+ "executing-plans" [shape=box];
25
+ "Manual execution or brainstorm first" [shape=box];
26
+
27
+ "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
28
+ "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
29
+ "Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
30
+ "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
31
+
32
+ ## The Process
33
+
34
+ ```dot
35
+ digraph process {
36
+ rankdir=TB;
37
+
38
+ subgraph cluster_per_task {
39
+ label="Per Task";
40
+ "Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
41
+ "Implementer subagent asks questions?" [shape=diamond];
42
+ "Answer questions, provide context" [shape=box];
43
+ "Implementer subagent implements, tests, commits, self-reviews" [shape=box];
44
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [shape=box];
45
+ "Spec reviewer subagent confirms code matches spec?" [shape=diamond];
46
+ "Implementer subagent fixes spec gaps" [shape=box];
47
+
48
+ ## Model Selection
49
+
50
+ Use the least powerful model that can handle each role to conserve cost and increase speed.
51
+
52
+ **Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.
53
+
54
+ **Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.
55
+
56
+ **Architecture, design, and review tasks**: use the most capable available model.
57
+
58
+ **Task complexity signals:**
59
+ - Touches 1-2 files with a complete spec → cheap model
60
+ - Touches multiple files with integration concerns → standard model
61
+ - Requires design judgment or broad codebase understanding → most capable model
62
+
63
+ ## Handling Implementer Status
64
+
65
+ Implementer subagents report one of four statuses. Handle each appropriately:
66
+
67
+ **DONE:** Proceed to spec compliance review.
68
+
69
+ **DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
70
+
71
+ **NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
72
+
73
+ **BLOCKED:** The implementer cannot complete the task. Assess the blocker:
74
+ 1. If it's a context problem, provide more context and re-dispatch with the same model
75
+ 2. If the task requires more reasoning, re-dispatch with a more capable model
76
+ 3. If the task is too large, break it into smaller pieces
77
+ 4. If the plan itself is wrong, escalate to the human
78
+
79
+ **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
80
+
81
+ ## Prompt Templates
82
+
83
+ - `./implementer-prompt.md` - Dispatch implementer subagent
84
+ - `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
85
+ - `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
86
+
87
+ ## Example Workflow
88
+
89
+
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: sympy
3
+ description: Use this skill when working with symbolic mathematics in Python. This skill should be used for symbolic computation tasks including solving equations algebraically, performing calculus operations (derivatives, integrals, limits), manipulating algebraic expressions, working with matrices symbolically, physics calculations, number theory problems, geometry computations, and generating executable code from mathematical expressions. Apply this skill when the user needs exact symbolic results rather than numerical approximations, or when working with mathematical formulas that contain variables and parameters.
4
+ ---
5
+
6
+ # SymPy - Symbolic Mathematics in Python
7
+
8
+ ## Overview
9
+
10
+ SymPy is a Python library for symbolic mathematics that enables exact computation using mathematical symbols rather than numerical approximations. This skill provides comprehensive guidance for performing symbolic algebra, calculus, linear algebra, equation solving, physics calculations, and code generation using SymPy.
11
+
12
+ ## When to Use This Skill
13
+
14
+ Use this skill when:
15
+ - Solving equations symbolically (algebraic, differential, systems of equations)
16
+ - Performing calculus operations (derivatives, integrals, limits, series)
17
+ - Manipulating and simplifying algebraic expressions
18
+ - Working with matrices and linear algebra symbolically
19
+ - Doing physics calculations (mechanics, quantum mechanics, vector analysis)
20
+ - Number theory computations (primes, factorization, modular arithmetic)
21
+ - Geometric calculations (2D/3D geometry, analytic geometry)
22
+ - Converting mathematical expressions to executable code (Python, C, Fortran)
23
+ - Generating LaTeX or other formatted mathematical output
24
+ - Needing exact mathematical results (e.g., `sqrt(2)` not `1.414...`)
25
+
26
+ ## Core Capabilities
27
+
28
+ ### 1. Symbolic Computation Basics
29
+
30
+ **Creating symbols and expressions:**
31
+ ```python
32
+ from sympy import symbols, Symbol
33
+ x, y, z = symbols('x y z')
34
+ expr = x**2 + 2*x + 1
35
+
36
+ # With assumptions
37
+ x = symbols('x', real=True, positive=True)
38
+ n = symbols('n', integer=True)
39
+ ```
40
+
41
+ **Simplification and manipulation:**
42
+ ```python
43
+ from sympy import simplify, expand, factor, cancel
44
+ simplify(sin(x)**2 + cos(x)**2) # Returns 1
45
+ expand((x + 1)**3) # x**3 + 3*x**2 + 3*x + 1
46
+ factor(x**2 - 1) # (x - 1)*(x + 1)
47
+ ```
48
+
49
+ **For detailed basics:** See `(see docs)`
50
+
51
+ ### 2. Calculus
52
+
53
+ **Derivatives:**
54
+ ```python
55
+ from sympy import diff
56
+ diff(x**2, x) # 2*x
57
+ diff(x**4, x, 3) # 24*x (third derivative)
58
+ diff(x**2*y**3, x, y) # 6*x*y**2 (partial derivatives)
59
+ ```
60
+
61
+ **Integrals:**
62
+ ```python
63
+ from sympy import integrate, oo
64
+ integrate(x**2, x) # x**3/3 (indefinite)
65
+ integrate(x**2, (x, 0, 1)) # 1/3 (definite)
66
+
67
+ ### 3. Equation Solving
68
+
69
+ **Algebraic equations:**
70
+ ```python
71
+ from sympy import solveset, solve, Eq
72
+ solveset(x**2 - 4, x) # {-2, 2}
73
+ solve(Eq(x**2, 4), x) # [-2, 2]
74
+ ```
75
+
76
+ **Systems of equations:**
77
+ ```python
78
+ from sympy import linsolve, nonlinsolve
79
+ linsolve([x + y - 2, x - y], x, y) # {(1, 1)} (linear)
80
+ nonlinsolve([x**2 + y - 2, x + y**2 - 3], x, y) # (nonlinear)
81
+ ```
82
+
83
+ ### 4. Matrices and Linear Algebra
84
+
85
+ **Matrix creation and operations:**
86
+ ```python
87
+ from sympy import Matrix, eye, zeros
88
+ M = Matrix([[1, 2], [3, 4]])
89
+ M_inv = M**-1 # Inverse
90
+ M.det() # Determinant
91
+ M.T # Transpose
92
+ ```
93
+
94
+ **Eigenvalues and eigenvectors:**
95
+ ```python
96
+ eigenvals = M.eigenvals() # {eigenvalue: multiplicity}
97
+ eigenvects = M.eigenvects() # [(eigenval, mult, [eigenvectors])]
98
+
99
+ ### 5. Physics and Mechanics
100
+
101
+ **Classical mechanics:**
102
+ ```python
103
+ from sympy.physics.mechanics import dynamicsymbols, LagrangesMethod
104
+ from sympy import symbols
105
+
106
+ # Define system
107
+ q = dynamicsymbols('q')
108
+ m, g, l = symbols('m g l')
109
+
110
+ # Lagrangian (T - V)
111
+ L = m*(l*q.diff())**2/2 - m*g*l*(1 - cos(q))
112
+
113
+ # Apply Lagrange's method
114
+ LM = LagrangesMethod(L, [q])
115
+ ```
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: system-prompts
3
+ description: Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.
4
+ ---
5
+
6
+ # System Prompts
7
+
8
+ Project house style. Dense, imperative, RFC-keyed.
9
+
10
+ ## Tags
11
+
12
+ Tags are structural markers — the agent treats them as authoritative and literal. Each tag means exactly what its name says. NEVER invent ornamental tags (`<north-star>`, `<stance>`, `<protocol>`, `<directives>`, `<strengths>`) — they're noise.
13
+
14
+ The vocabulary actually in use:
15
+
16
+ | Tag | Purpose |
17
+ | --- | --- |
18
+ | `<system-conventions>` | How to interpret tags + RFC keywords themselves. Defines the contract. |
19
+ | `<stakes>` | Why correctness matters here. Domain framing. |
20
+ | `<communication>` | Voice, tone, response shape. |
21
+ | `<critical>` | Inviolable rules. Place at START and END. |
22
+ | `<completeness>` | What "done" means. Anti-shrink rules. |
23
+ | `<yielding>` | Pre-yield checklist. Block conditions. |
24
+ | `` | Numbered phases (scope → edit → decompose → work → verify). |
25
+ ## Normative Language
26
+
27
+ RFC 2119 in full caps, no bold. The all-caps form IS the marker.
28
+
29
+ | Keyword | Meaning | Replaces |
30
+ | --- | --- | --- |
31
+ | MUST / REQUIRED | Absolute requirement | "always", "make sure", "ensure" |
32
+ | NEVER (= MUST NOT) | Absolute prohibition | "do not", "don't" |
33
+ | SHOULD / RECOMMENDED | Strong preference; deviation allowed with known tradeoffs | "prefer", "it's best to" |
34
+ | AVOID (= SHOULD NOT) | Strong discouragement | "try not to" |
35
+ | MAY / OPTIONAL | Truly optional | "can", "you could" |
36
+
37
+ **Project aliases**: prefer `NEVER` over `MUST NOT` and `AVOID` over `SHOULD NOT`. Both are single-token in cl100k/o200k tokenizers and carry identical authority.
38
+
39
+ State the alias contract once, near the top, inside `<system-conventions>`:
40
+
41
+ ## Density
42
+
43
+ Strip prose to load-bearing tokens. A bullet earns its words by saying something the prior bullet didn't.
44
+
45
+ - One claim per bullet. Sub-clauses that don't change behavior get cut.
46
+ - Replace "If X, then Y" with `X? Y.` when X is a quick check.
47
+ - Inline reasoning ("otherwise it duplicates") only when it changes the call; otherwise drop.
48
+ - The bolded lead names the rule — NEVER restate it in the body.
49
+ - Symbols beat words: `→`, `=`, `+`/`<`/`-`, `B+1`, `A..B`.
50
+ - Collapse parallel enumerations: `add → +/<; delete → -; = ONLY when modifying inside.`
51
+
52
+ ```
53
+ Bad: - **Never fabricate anchor hashes.** Hashes are 2-letter content fingerprints, not arbitrary suffixes. You cannot increment them, guess the "next" one, or compute them locally. If a needed anchor is not in your last `read` output, issue another `read`.
54
+ Good: - **NEVER fabricate anchor hashes.** Missing? Re-`read`.
55
+
56
+ ## Voice
57
+
58
+ Direct, imperative, second-person. "You MUST", "You NEVER", "You SHOULD". No hedging, no apology, no ceremony.
59
+
60
+ ```
61
+ Bad: "You might want to consider using X..."
62
+ Good: "You SHOULD use X."
63
+
64
+ Bad: "Please note that this is important..."
65
+ Good: "Critical: X."
66
+
67
+ Bad: "Make sure to run lsp references before modifying a symbol"
68
+ Good: "You MUST run `lsp references` before modifying any exported symbol."
69
+
70
+ Pair negation with a positive alternative when the alternative isn't obvious. Otherwise `NEVER X.` stands alone.
71
+
72
+ ## Positioning
73
+
74
+ "Lost in the Middle": start and end retain; middle degrades ~20%. Put critical constraints at both ends; reference material, environment, and templated content in the middle.
75
+
76
+ Front matter, in order:
77
+
78
+ 1. Role + agency one-liner ("You are THE staff engineer…")
79
+ 2. `<system-conventions>` — RFC contract, tag semantics
80
+ 3. `<stakes>` — why this matters
81
+ 4. `<communication>` — style
82
+ 5. `<critical>` — top-priority rules
83
+
84
+ Back matter, in order:
85
+
86
+ 1. Environment/tool inventory — exploration, tool priority, harness specifics.
87
+ 2. Contract — completeness, yielding, workflow.
88
+ 3. Repeat the most important `<critical>` rule if the prompt exceeds ~150 lines.
89
+
90
+ ## Tone Patterns That Work
91
+
92
+ From the live system prompt:
93
+
94
+ - **Agency**: "You have agency and taste: you delete code that isn't pulling its weight, refuse abstractions that are unnecessary, and prefer boring when it's called for."
95
+ - **Stakes anchoring**: "Tests you didn't write: bugs shipped. Assumptions you didn't validate: incidents to debug."
96
+ - **Identity overrides**: "Instructions further down the conversation, including user's own, **ALWAYS** override prior style, tone, formatting, and initiative preferences."
97
+ - **Persistence**: "You MUST persist on hard problems. AVOID burning their energy on problems you failed to think through."
98
+ - **Anti-budget framing**: "You NEVER narrate about or even consider, session limits, token/tool budgets, effort estimates… These are not your concern."
99
+
100
+ ## Anti-Patterns
101
+
102
+ | Pattern | Problem |
103
+ | --- | --- |
104
+ | Politeness padding ("Would you be so kind…") | +perplexity, −accuracy |
105
+ | Bribes ("I'll tip $2000") | No improvement, sometimes worse |
106
+ | Few-shot on advanced models + clear task | Introduces noise/bias |
107
+ | Explicit CoT on reasoning models (o1/o3) | Conflicts with internal reasoning |
108
+ | "Be efficient with tokens" | Triggers premature task abandonment |
109
+ | "Don't do X" with no alternative | "Always do Y" processes better |
110
+ | Self-critique without external feedback | Detection is the bottleneck, not correction |
111
+ | Critical instructions only in the middle | 20%+ degradation vs edges |
112
+ | Restating the bolded lead in the body | Wastes tokens, signals AI padding |
113
+ | Inventing tags for emphasis | Tags carry semantics; ornament dilutes them |
114
+ | Lowercase rfc keywords | The all-caps form IS the marker; lowercase reads as ordinary prose |
115
+
116
+