@c4a/extract-rush 0.6.8 → 0.6.9
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 +53 -7
- package/README.zh-CN.md +49 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Rush Workspace Structure for Context
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`
|
|
3
|
+
[简体中文](./README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
`@c4a/extract-rush` creates a deterministic structural index of a Rush
|
|
6
|
+
workspace. It reports project identity, tags, subspaces, publish intent, entry
|
|
7
|
+
signals, local dependency edges, decoupled dependencies, and nearest `OWNERS`
|
|
8
|
+
boundaries.
|
|
9
|
+
|
|
10
|
+
The index is evidence for a Context knowledge project; it is not a product
|
|
11
|
+
taxonomy. A project decides which facts matter to its audience and maps them to
|
|
12
|
+
candidates through `extractCustom()`. Context continues to own source identity,
|
|
13
|
+
candidate freshness, review, approved knowledge, and package output.
|
|
14
|
+
|
|
15
|
+
## Place in the knowledge workflow
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
confirmed Rush repository boundary
|
|
19
|
+
↓
|
|
20
|
+
rush.json + package.json + OWNERS facts
|
|
21
|
+
↓
|
|
22
|
+
project-owned candidate mapping
|
|
23
|
+
↓
|
|
24
|
+
reviewed architecture / ownership / package knowledge
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
6
28
|
|
|
7
29
|
```ts
|
|
8
30
|
import { indexRushWorkspace } from "@c4a/extract-rush";
|
|
9
31
|
|
|
10
|
-
const facts = await indexRushWorkspace(repositoryRoot, {
|
|
32
|
+
const facts = await indexRushWorkspace(repositoryRoot, {
|
|
33
|
+
tags: ["frontend"],
|
|
34
|
+
});
|
|
11
35
|
```
|
|
12
36
|
|
|
13
|
-
|
|
14
|
-
|
|
37
|
+
With no tag filter, all projects are selected. `includeAll: true` explicitly
|
|
38
|
+
selects every project. Results are sorted and stable, making them suitable for
|
|
39
|
+
source fingerprints and repeatable candidate generation.
|
|
40
|
+
|
|
41
|
+
The index includes:
|
|
42
|
+
|
|
43
|
+
- Rush and package-manager versions;
|
|
44
|
+
- package names and whether `package.json` identity matches `rush.json`;
|
|
45
|
+
- project folders, subspaces, tags, and publish flags;
|
|
46
|
+
- `main`, `module`, `types`, `exports`, and `bin` entry signals;
|
|
47
|
+
- local dependency kinds and specifiers, including decoupled edges;
|
|
48
|
+
- nearest repository-relative `OWNERS` file and normalized reviewers.
|
|
49
|
+
|
|
50
|
+
This optional package does not add a public Agent entry or Context lifecycle
|
|
51
|
+
phase. It remains a reusable structural library for project adapters.
|
|
52
|
+
|
|
53
|
+
## Development
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
bun run --filter @c4a/extract-rush build
|
|
57
|
+
bun run --filter @c4a/extract-rush typecheck
|
|
58
|
+
bun run --filter @c4a/extract-rush test
|
|
59
|
+
bun run --filter @c4a/extract-rush lint
|
|
60
|
+
```
|
package/README.zh-CN.md
CHANGED
|
@@ -1,13 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Context Rush 工作区结构
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[English](./README.md)
|
|
4
|
+
|
|
5
|
+
`@c4a/extract-rush` 为 Rush 工作区生成确定性结构索引。它报告项目身份、标签、
|
|
6
|
+
subspace、发布意图、入口信号、本地依赖边、解耦依赖和最近的 `OWNERS` 边界。
|
|
7
|
+
|
|
8
|
+
这些索引是 Context 知识项目的证据,不是产品分类。项目决定哪些事实对目标读者有
|
|
9
|
+
价值,并通过 `extractCustom()` 映射为候选;来源身份、候选新鲜度、审核、正式知识
|
|
10
|
+
和知识包产出继续由 Context 负责。
|
|
11
|
+
|
|
12
|
+
## 在知识生产链中的位置
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
已确认的 Rush 仓库边界
|
|
16
|
+
↓
|
|
17
|
+
rush.json + package.json + OWNERS 事实
|
|
18
|
+
↓
|
|
19
|
+
项目自有候选映射
|
|
20
|
+
↓
|
|
21
|
+
经过审核的架构 / 归属 / package 知识
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 使用
|
|
5
25
|
|
|
6
26
|
```ts
|
|
7
27
|
import { indexRushWorkspace } from "@c4a/extract-rush";
|
|
8
28
|
|
|
9
|
-
const facts = await indexRushWorkspace(repositoryRoot, {
|
|
29
|
+
const facts = await indexRushWorkspace(repositoryRoot, {
|
|
30
|
+
tags: ["frontend"],
|
|
31
|
+
});
|
|
10
32
|
```
|
|
11
33
|
|
|
12
|
-
|
|
13
|
-
|
|
34
|
+
不提供 tag filter 时选择所有项目;`includeAll: true` 也会显式选择全部项目。结果
|
|
35
|
+
经过排序并保持稳定,适合生成来源指纹和可重复的候选。
|
|
36
|
+
|
|
37
|
+
索引包含:
|
|
38
|
+
|
|
39
|
+
- Rush 和 package manager 版本;
|
|
40
|
+
- package 名,以及 `package.json` 身份是否与 `rush.json` 一致;
|
|
41
|
+
- project folder、subspace、tag 和 publish flag;
|
|
42
|
+
- `main`、`module`、`types`、`exports` 和 `bin` 入口信号;
|
|
43
|
+
- 本地依赖类型和 specifier,包括 decoupled edge;
|
|
44
|
+
- 最近的 repo-relative `OWNERS` 文件和标准化 reviewer。
|
|
45
|
+
|
|
46
|
+
这个可选包不会增加公开 Agent 入口或 Context 生命周期阶段,只作为项目 Adapter
|
|
47
|
+
可以复用的结构库。
|
|
48
|
+
|
|
49
|
+
## 开发
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bun run --filter @c4a/extract-rush build
|
|
53
|
+
bun run --filter @c4a/extract-rush typecheck
|
|
54
|
+
bun run --filter @c4a/extract-rush test
|
|
55
|
+
bun run --filter @c4a/extract-rush lint
|
|
56
|
+
```
|