@binarycheater/research-sidecar 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,20 +2,6 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- Research Sidecar is a local web app and npm CLI for graph-backed research work. It is designed to run beside Codex: Codex can create or update research notes, while Research Sidecar gives you a readable graph, document preview, and explicit review surface for judging the work.
6
-
7
- The important rule is simple: **the directory where you run `research-sidecar` is the workspace**. The app reads and writes only inside that workspace, and stores private local state under `.side/`.
8
-
9
- ## Why It Exists
10
-
11
- Research work often starts from vague questions and evolves through experiments, reports, partial conclusions, and revisions. A linear folder of Markdown files becomes hard to inspect. Research Sidecar separates the problem into three layers:
12
-
13
- - `graph.yaml`: the structural map of questions, methods, claims, evidence, tasks, and outputs.
14
- - Markdown/HTML files: the detailed reasoning, experiment reports, tables, formulas, and drafts.
15
- - `.side/`: local private app state, selected graph, sessions, and provider config.
16
-
17
- This gives Codex a concrete structure to maintain while giving the human reader a compact interface for understanding what happened.
18
-
19
5
  ## Install
20
6
 
21
7
  Global install:
@@ -40,6 +26,20 @@ Open:
40
26
  http://localhost:4317
41
27
  ```
42
28
 
29
+ Research Sidecar is a local web app and npm CLI for graph-backed research work. It is designed to run beside Codex: Codex can create or update research notes, while Research Sidecar gives you a readable graph, document preview, and explicit review surface for judging the work.
30
+
31
+ The important rule is simple: **the directory where you run `research-sidecar` is the workspace**. The app reads and writes only inside that workspace, and stores private local state under `.side/`.
32
+
33
+ ## Why It Exists
34
+
35
+ Research work often starts from vague questions and evolves through experiments, reports, partial conclusions, and revisions. A linear folder of Markdown files becomes hard to inspect. Research Sidecar separates the problem into three layers:
36
+
37
+ - `graph.yaml`: the structural map of questions, methods, claims, evidence, tasks, and outputs.
38
+ - Markdown/HTML files: the detailed reasoning, experiment reports, tables, formulas, and drafts.
39
+ - `.side/`: local private app state, selected graph, sessions, and provider config.
40
+
41
+ This gives Codex a concrete structure to maintain while giving the human reader a compact interface for understanding what happened.
42
+
43
43
  ## CLI Commands
44
44
 
45
45
  Start the app for the current directory:
@@ -194,7 +194,8 @@ research-sidecar install-skills
194
194
  This copies bundled skills into:
195
195
 
196
196
  ```txt
197
- <workspace>/skills/
197
+ <workspace>/.agents/skills/
198
+ <workspace>/.claude/skills/
198
199
  ```
199
200
 
200
201
  Existing skill directories are skipped by default. Use `--force` when you intentionally want to overwrite install-managed skills.
package/README.zh.md CHANGED
@@ -2,20 +2,6 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- Research Sidecar 是一个用于 graph-backed research workflow 的本地 Web 应用和 npm CLI。它适合和 Codex 一起工作:Codex 可以生成、澄清、修改研究笔记;Research Sidecar 提供可读的研究图、文档预览和明确的 review 界面,帮助人判断这些工作是否合理。
6
-
7
- 最重要的规则是:**你在哪里运行 `research-sidecar`,哪里就是 workspace**。应用只在这个 workspace 内读写文件,并把私有本地状态保存在 `.side/`。
8
-
9
- ## 为什么需要它
10
-
11
- 研究工作通常从模糊问题开始,逐步形成实验、报告、局部结论和修订。如果所有内容只是散落在 Markdown 文件里,人很难快速理解当前状态。Research Sidecar 把研究拆成三层:
12
-
13
- - `graph.yaml`:研究结构图,包括问题、方法、claim、证据、任务和输出。
14
- - Markdown/HTML 文件:详细推理、实验报告、表格、公式和草稿。
15
- - `.side/`:本地私有状态,包括当前选择的 graph、session 和 provider 配置。
16
-
17
- 这样 Codex 有一个明确结构可以维护,人也能通过 UI 快速理解研究进展。
18
-
19
5
  ## 安装
20
6
 
21
7
  全局安装:
@@ -40,6 +26,20 @@ npx research-sidecar
40
26
  http://localhost:4317
41
27
  ```
42
28
 
29
+ Research Sidecar 是一个用于 graph-backed research workflow 的本地 Web 应用和 npm CLI。它适合和 Codex 一起工作:Codex 可以生成、澄清、修改研究笔记;Research Sidecar 提供可读的研究图、文档预览和明确的 review 界面,帮助人判断这些工作是否合理。
30
+
31
+ 最重要的规则是:**你在哪里运行 `research-sidecar`,哪里就是 workspace**。应用只在这个 workspace 内读写文件,并把私有本地状态保存在 `.side/`。
32
+
33
+ ## 为什么需要它
34
+
35
+ 研究工作通常从模糊问题开始,逐步形成实验、报告、局部结论和修订。如果所有内容只是散落在 Markdown 文件里,人很难快速理解当前状态。Research Sidecar 把研究拆成三层:
36
+
37
+ - `graph.yaml`:研究结构图,包括问题、方法、claim、证据、任务和输出。
38
+ - Markdown/HTML 文件:详细推理、实验报告、表格、公式和草稿。
39
+ - `.side/`:本地私有状态,包括当前选择的 graph、session 和 provider 配置。
40
+
41
+ 这样 Codex 有一个明确结构可以维护,人也能通过 UI 快速理解研究进展。
42
+
43
43
  ## CLI 命令
44
44
 
45
45
  把当前目录作为 workspace 启动:
@@ -194,7 +194,8 @@ research-sidecar install-skills
194
194
  这会把 bundled skills 复制到:
195
195
 
196
196
  ```txt
197
- <workspace>/skills/
197
+ <workspace>/.agents/skills/
198
+ <workspace>/.claude/skills/
198
199
  ```
199
200
 
200
201
  默认不会覆盖已有 skill 目录。如果你明确想覆盖 install-managed skills,使用 `--force`。
@@ -2,6 +2,7 @@ import { access, cp, mkdir, readdir, readFile, writeFile } from "node:fs/promise
2
2
  import { dirname, join, resolve } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  const DEFAULT_ALLOWED_WRITE_EXTENSIONS = [".md", ".markdown", ".html", ".htm", ".yaml", ".yml"];
5
+ const SKILL_INSTALL_ROOTS = [".agents/skills", ".claude/skills"];
5
6
  export async function installWorkspaceScaffold(workspaceRoot, options = {}) {
6
7
  const root = resolve(workspaceRoot);
7
8
  const graphManifestPath = normalizeWorkspacePath(options.graphManifestPath || "research/graph.yaml");
@@ -28,21 +29,32 @@ export async function installBundledSkills(workspaceRoot, options = {}) {
28
29
  if (!sourceRoot)
29
30
  return { sourceRoot: null, installed: [], skipped: [] };
30
31
  const entries = await readdir(sourceRoot, { withFileTypes: true });
31
- const targetRoot = join(resolve(workspaceRoot), "skills");
32
+ const root = resolve(workspaceRoot);
33
+ const targetRoots = SKILL_INSTALL_ROOTS.map((target) => join(root, target));
32
34
  const installed = [];
33
35
  const skipped = [];
34
- await mkdir(targetRoot, { recursive: true });
36
+ await Promise.all(targetRoots.map((targetRoot) => mkdir(targetRoot, { recursive: true })));
35
37
  for (const entry of entries) {
36
38
  if (!entry.isDirectory())
37
39
  continue;
38
40
  const source = join(sourceRoot, entry.name);
39
- const target = join(targetRoot, entry.name);
40
- if (!options.force && (await exists(target))) {
41
+ let copied = false;
42
+ let alreadyPresent = false;
43
+ for (const targetRoot of targetRoots) {
44
+ const target = join(targetRoot, entry.name);
45
+ if (!options.force && (await exists(target))) {
46
+ alreadyPresent = true;
47
+ continue;
48
+ }
49
+ await cp(source, target, { recursive: true, force: true });
50
+ copied = true;
51
+ }
52
+ if (copied) {
53
+ installed.push(entry.name);
54
+ }
55
+ if (alreadyPresent) {
41
56
  skipped.push(entry.name);
42
- continue;
43
57
  }
44
- await cp(source, target, { recursive: true, force: true });
45
- installed.push(entry.name);
46
58
  }
47
59
  return { sourceRoot, installed, skipped };
48
60
  }
@@ -105,7 +105,7 @@ async function listFiles(root, maxDepth, dir = "", depth = 0) {
105
105
  }
106
106
  const results = [];
107
107
  for (const entry of entries) {
108
- if (entry.name.startsWith(".") && entry.name !== ".agents")
108
+ if (entry.name.startsWith(".") && entry.name !== ".agents" && entry.name !== ".claude")
109
109
  continue;
110
110
  if (SKIP_DIRS.has(entry.name))
111
111
  continue;
@@ -130,9 +130,11 @@ function parseSkillFrontmatter(content) {
130
130
  };
131
131
  }
132
132
  function skillPriority(path) {
133
- if (/^skills\/[^/]+\/SKILL\.md$/i.test(path))
134
- return 3;
135
133
  if (/^\.agents\/skills\/[^/]+\/SKILL\.md$/i.test(path))
134
+ return 4;
135
+ if (/^\.claude\/skills\/[^/]+\/SKILL\.md$/i.test(path))
136
+ return 3;
137
+ if (/^skills\/[^/]+\/SKILL\.md$/i.test(path))
136
138
  return 2;
137
139
  return 1;
138
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@binarycheater/research-sidecar",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Local research graph sidecar and CLI for Codex-assisted research workflows.",
5
5
  "keywords": [
6
6
  "research",
@@ -17,6 +17,15 @@ Prefer this reasoning backbone:
17
17
 
18
18
  `question -> claim -> method -> evidence -> revision/task/output`
19
19
 
20
+ Prefer a tree-like shape for the primary reading path. The graph may remain a DAG when shared evidence, sources, or claims genuinely need reuse, but the default shape should branch outward from the root rather than tangle back into earlier layers.
21
+
22
+ For visual clarity:
23
+
24
+ - Point hierarchy edges away from the root along the main reasoning flow.
25
+ - Avoid edges that point back toward ancestors unless the reversal captures a real contradiction, dependency, or revision that cannot be expressed forward.
26
+ - Keep lines short, direct, and easy to scan; remove vague cross-links that make the graph look dense without improving navigation.
27
+ - Prefer one clear parent plus a small number of meaningful lateral links over many convenience links.
28
+
20
29
  A useful graph should let a reader answer:
21
30
 
22
31
  1. What question is being decomposed?