@c4a/context-cli 0.6.0-alpha.1 → 0.6.0-beta.1

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 (55) hide show
  1. package/cli.js +49755 -34355
  2. package/package.json +1 -1
  3. package/plugin/skills/skill-prose-align/SKILL.md +23 -9
  4. package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +44 -10
  5. package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +32 -1
  6. package/plugin/skills/skill-prose-compile/SKILL.md +17 -8
  7. package/plugin/skills/skill-review-gate/SKILL.md +5 -5
  8. package/plugin/skills/skill-source-scope/SKILL.md +98 -71
  9. package/plugin/skills/skill-source-scope/references/capture-source.md +25 -15
  10. package/plugins/VERSION +1 -1
  11. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  12. package/plugins/claude/skills/skill-prose-align/SKILL.md +23 -9
  13. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +44 -10
  14. package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +32 -1
  15. package/plugins/claude/skills/skill-prose-compile/SKILL.md +17 -8
  16. package/plugins/claude/skills/skill-review-gate/SKILL.md +5 -5
  17. package/plugins/claude/skills/skill-source-scope/SKILL.md +98 -71
  18. package/plugins/claude/skills/skill-source-scope/references/capture-source.md +25 -15
  19. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  20. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +44 -10
  21. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +32 -1
  22. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +23 -9
  23. package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +17 -8
  24. package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +5 -5
  25. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +25 -15
  26. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +98 -71
  27. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +44 -10
  28. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +32 -1
  29. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +23 -9
  30. package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +17 -8
  31. package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +5 -5
  32. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +25 -15
  33. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +98 -71
  34. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  35. package/plugins/cursor/skills/skill-prose-align/SKILL.md +23 -9
  36. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +44 -10
  37. package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning.md +32 -1
  38. package/plugins/cursor/skills/skill-prose-compile/SKILL.md +17 -8
  39. package/plugins/cursor/skills/skill-review-gate/SKILL.md +5 -5
  40. package/plugins/cursor/skills/skill-source-scope/SKILL.md +98 -71
  41. package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +25 -15
  42. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +44 -10
  43. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +32 -1
  44. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +23 -9
  45. package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +17 -8
  46. package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +5 -5
  47. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +25 -15
  48. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +98 -71
  49. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +44 -10
  50. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +32 -1
  51. package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +23 -9
  52. package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +17 -8
  53. package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +5 -5
  54. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +25 -15
  55. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +98 -71
@@ -13,10 +13,10 @@ tools:
13
13
  Current capture discipline for document sources. The executable path is source
14
14
  registration plus the declared capture phase flow:
15
15
 
16
- - local Markdown/MDX file source: `context source add file <name> --local <path>`
17
- followed by `context run capture:file:<name> --format json`;
18
- - Lark/Feishu source: `context source add lark <name> ...` followed by
19
- `context run capture:lark:<name> --format json`;
16
+ - local Markdown/MDX file source: `context source add file --local <path>`
17
+ followed by `context run capture:file:<source-name> --format json`;
18
+ - Lark/Feishu source: `context source add lark ...` followed by
19
+ `context run capture:lark:<source-name> --format json`;
20
20
  - refresh: rerun the same declared capture phase after status or the user asks
21
21
  for recapture.
22
22
 
@@ -52,19 +52,29 @@ manager or version.
52
52
  Before choosing a local Markdown capture route, honor the surrounding task context. Driver documents such as run instructions, handbooks, READMEs, plans, feedback issues, corpus/index/manifests, and batch lists are not Context sources unless the user explicitly asks to ingest them. Capture only ingest targets that are already explicit in the user request; if they are missing, ask one clarification instead of capturing the driver document.
53
53
 
54
54
  - One or more local `.md` / `.mdx` files or a local documentation folder to ingest →
55
- register one file source with the user-confirmed source name and boundary:
56
- `context source add file <name> --local <file-or-folder>`. For an explicit
55
+ register one file source with the user-confirmed boundary:
56
+ `context source add file --local <file-or-folder>`. The CLI returns the date
57
+ source name (`YYYYMMDD`) to use in project phases. For an explicit
57
58
  batch inside a broader folder, preserve the user's include list on source
58
- registration. Default file capture handles `.md`. For MDX documentation sites
59
- that use `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in
60
- `src/index.ts`; keep `_meta.json` only when it is route metadata for the
61
- selected document folder. It is captured as metadata, not body evidence.
62
- Declare `captureFile({ source: source("<name>") })`, then run
63
- `context run capture:file:<name> --format json`.
59
+ registration. Default file capture handles `.md`. If the CLI reports
60
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
61
+ stop and confirm whether the selected boundary is a documentation site before
62
+ changing capture configuration. For MDX documentation sites that use
63
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
64
+ keep `_meta.json` only when it is route metadata for the selected document
65
+ folder. The CLI captures it as metadata and generates
66
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
67
+ static MDX component props/children into `__context_mdx_component_text.md`
68
+ when components carry user-facing text. Declare
69
+ `captureFile({ source: source("<source-name>"), processor: mdxJsonDocs() })`, then
70
+ run `context run capture:file:<source-name> --format json`. If the selected MDX page
71
+ is empty or only mounts runtime-rendered content, tell the user that capture
72
+ found a document-site shell and ask for the rendered-site or data-source
73
+ boundary instead of inventing body text.
64
74
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
- `context source add lark <name> --url <url>` or the matching token flag.
66
- Declare `captureLark({ source: source("<name>") })`, then run
67
- `context run capture:lark:<name> --format json`.
75
+ `context source add lark --url <url>` or the matching token flag.
76
+ Declare `captureLark({ source: source("<source-name>") })`, then run
77
+ `context run capture:lark:<source-name> --format json`.
68
78
  - Mixed local document and Lark document batches are separate sources unless
69
79
  the current CLI explicitly offers a combined source contract. Do not write an
70
80
  Agent-side URL/file loop.
@@ -21,22 +21,21 @@ Choose and validate what may become draft knowledge.
21
21
  file source, or Lark/Feishu document. Current CLI can execute repo sources,
22
22
  local file sources, and Lark document capture through the declared flow.
23
23
  - Treat source registration as a knowledge-boundary decision, not a parameter
24
- prompt. Explain that the source name becomes a stable namespace in source
25
- refs, phase ids, and package naming. Approved knowledge paths are derived
26
- later from collection, containment, and slug. Give concrete examples before
27
- asking for confirmation.
28
- - If the user already provided a path and only the source name is missing, still
29
- explain what that name means. Do not ask "confirm source name" without saying
30
- whether the boundary is a single package/module or a parent monorepo/subspace
31
- namespace.
24
+ prompt. Do not invent semantic source names from paths, filenames, or source
25
+ body content. By default, omit the source name and let the CLI use today's
26
+ date (`YYYYMMDD`) as the source namespace. Explain that this namespace appears
27
+ in source refs, phase ids, and package naming; approved knowledge paths are
28
+ derived later from collection, containment, and slug.
29
+ - If the default date source name already exists, stop and ask the user which
30
+ explicit date name to use. Do not auto-append sequence numbers and do not
31
+ summarize the source theme as a fallback.
32
32
  - Do not infer a source from cwd, parent directories, package names, monorepo
33
33
  layout, or git remote.
34
34
  - In monorepos, one source may conceptually be the whole repo/subspace or one
35
35
  package/subdirectory. If the user wants one package manual, prefer the
36
36
  package/subdirectory. If the user wants one unified knowledge product across
37
- modules, explain that the source name becomes the repo/source identity and
38
- may be used in codegraph NodeRefs such as `codegraph/product-ui/...` when the
39
- extraction rules derive those refs. Current repo extraction
37
+ modules, explain that the date source namespace can be used in codegraph
38
+ NodeRefs when extraction rules derive grouped refs. Current repo extraction
40
39
  still requires choosing a concrete single-module extraction boundary before
41
40
  running extraction; do not run extraction against an ambiguous multi-module
42
41
  source.
@@ -74,11 +73,29 @@ Ask for a knowledge source in plain language and map it to the supported path:
74
73
 
75
74
  | User source | What to ask for | Current handling |
76
75
  |---|---|---|
77
- | Local code repo | knowledge boundary, stable source name, and local repo path | Register with `context source add repo <name> --local <path>`. CLI records git root + optional `subpath`; `sources/repo/<name>` becomes an ignored symlink to the chosen repo/subdir view. |
78
- | Local monorepo package/module | whether the source is the whole repo/subspace or one package/subdir; stable source name; chosen path | Register the chosen boundary as the repo source. If the user wants one package manual, register that package/subdir. If the user wants a unified subspace manual, register the subspace. Do not use `extractTs.include` as a package selector. |
79
- | Remote Git repo | knowledge boundary, stable source name, remote URL, pinned commit/ref, desired package/subdir, and permission to clone | CLI does not clone automatically. After explicit user approval, the agent may clone/checkout to an ignored local path, then register that local checkout. Cloned source content must not be committed. |
80
- | Local Markdown / document file or folder | document boundary, stable source name, local path, include glob if needed, and permission to read the source body | Register with `context source add file <name> --local <path>`, declare the matching capture phase, then hand off to material investigation and structure drafting after capture. Do not run capture before the user confirms read permission. |
81
- | Lark / Feishu document | document URL/token, intended collection, and permission to read remotely | Register with `context source add lark <name>` plus exactly one of `--url`, `--doc-token`, or `--wiki-token`; declare the matching capture phase, then hand off to material investigation and structure drafting after capture. Explain that capture writes a committed snapshot under `sources/lark/<name>/`, supports offline verify/fresh clone reproduction, and does not write credentials. Do not fetch through ad hoc scripts. |
76
+ | Local code repo | knowledge boundary and local repo path | Register with `context source add repo --local <path>` unless the user explicitly provides a date source name. CLI records git root + optional `subpath`; `sources/repo/YYYYMMDD` becomes an ignored symlink to the chosen repo/subdir view. |
77
+ | Local monorepo package/module | whether the source is the whole repo/subspace or one package/subdir; chosen path | Register the chosen boundary as the repo source. If the user wants one package manual, register that package/subdir. If the user wants a unified subspace manual, register the subspace. Do not use `extractTs.include` as a package selector. |
78
+ | Remote Git repo | knowledge boundary, remote URL, pinned commit/ref, desired package/subdir, and permission to clone | CLI does not clone automatically. After explicit user approval, the agent may clone/checkout to an ignored local path, then register that local checkout. Cloned source content must not be committed. |
79
+ | Local Markdown / document file or folder | document boundary, local path, include glob or include-list if needed, and permission to read the source body | Register with `context source add file --local <path>`, declare the matching capture phase, then hand off to material investigation and structure drafting after capture. Do not run capture before the user confirms read permission. |
80
+ | Lark / Feishu document | document URL/token, intended collection, and permission to read remotely | Register with `context source add lark` plus exactly one of `--url`, `--doc-token`, or `--wiki-token`; declare the matching capture phase, then hand off to material investigation and structure drafting after capture. Explain that capture writes a committed snapshot under `sources/lark/YYYYMMDD/`, supports offline verify/fresh clone reproduction, and does not write credentials. Do not fetch through ad hoc scripts. |
81
+
82
+ When asking for a document mainline collection, do not ask only "which
83
+ collection?". Explain every available option in product language:
84
+
85
+ | Collection | Use when the source is mainly about |
86
+ |---|---|
87
+ | `business` | 业务域、业务对象、行业/组织概念、非技术的领域知识 |
88
+ | `product` | PRD、用户故事、产品行为、需求说明、验收口径 |
89
+ | `architecture` | 系统架构、组件/模块设计、技术方案、工具链、平台能力 |
90
+ | `sop` | SOP、操作流程、排障步骤、oncall/runbook、巡检维护 |
91
+ | `faq` | 问答集合、常见问题、按问题检索的解释和处理建议 |
92
+ | `standards` | 规范、标准、约束、检查清单、合规/质量规则 |
93
+ | `decision` | 明确的方案选择、取舍理由、ADR、决策记录 |
94
+ | `incident` | 事故复盘、故障时间线、影响面、根因、处置和预防措施 |
95
+ | `test` | 测试计划、测试场景、验证矩阵、验收用例 |
96
+
97
+ Do not offer `codegraph` or `feats` for prose document alignment. `codegraph`
98
+ comes from code extraction, and `feats` is a later feature namespace.
82
99
 
83
100
  </reference>
84
101
 
@@ -92,48 +109,48 @@ choice:
92
109
 
93
110
  ```text
94
111
  You are choosing what one source means for this knowledge workspace.
95
- The source name becomes part of source refs and phase ids. Approved knowledge
112
+ The date source name becomes part of source refs and phase ids. Approved knowledge
96
113
  paths are derived later from collection, containment, and slug. NodeRef and
97
114
  ViewRef are identity fields, not path strings.
98
115
 
99
116
  If the source is one package:
100
- knowledge/codegraph/component-lib/...
101
- repo:component-lib#symbol:...
102
- capture:file:component-lib
103
- dist/component-lib-kb/
117
+ knowledge/codegraph/YYYYMMDD/...
118
+ repo:YYYYMMDD#symbol:...
119
+ capture:file:YYYYMMDD
120
+ dist/YYYYMMDD-kb/
104
121
 
105
122
  If the source is one document source:
106
123
  knowledge/architecture/entity/example.md
107
- file:product-docs/getting-started.md#span:...
108
- align:file:product-docs:architecture
109
- dist/product-docs-kb/
124
+ file:YYYYMMDD/getting-started.md#span:...
125
+ align:file:YYYYMMDD:architecture
126
+ dist/YYYYMMDD-kb/
110
127
 
111
128
  If the source is a parent monorepo/subspace namespace, later multi-module
112
129
  outputs can be shaped like:
113
- knowledge/codegraph/product-ui/component-web/...
114
- knowledge/codegraph/product-ui/component-lynx/...
130
+ knowledge/codegraph/YYYYMMDD/component-web/...
131
+ knowledge/codegraph/YYYYMMDD/component-lynx/...
115
132
  ```
116
133
 
117
- If the source already points at one package/module root, the path uses the
118
- source name once. An extra module/package segment is only expected when the
119
- chosen source boundary intentionally covers multiple modules. In the current workflow, treat that
120
- parent source as a planning/inspection boundary first; choose a concrete
121
- package/subdirectory source before real extraction.
134
+ If the source already points at one package/module root, the source namespace
135
+ is still the date name. An extra module/package segment is only expected when
136
+ the chosen source boundary intentionally covers multiple modules. In the
137
+ current workflow, treat that parent source as a planning/inspection boundary
138
+ first; choose a concrete package/subdirectory source before real extraction.
122
139
 
123
140
  When the user has already provided a path, describe the current interpretation
124
- before asking for the name:
141
+ and use the CLI date default:
125
142
 
126
143
  ```text
127
144
  I am treating this path as the source boundary:
128
145
  <path>
129
146
 
130
- If this path is one package/module, the source name will be used directly:
131
- source refs such as repo:<source-name>#...
147
+ If this path is one package/module, the date source name will be used in
148
+ source refs such as repo:YYYYMMDD#...
132
149
 
133
150
  If this path is a parent monorepo/subspace that contains multiple modules, the
134
- source name becomes the parent source namespace for grouped codegraph NodeRefs
151
+ date source name becomes the parent source namespace for grouped codegraph NodeRefs
135
152
  when extraction derives those refs:
136
- knowledge/codegraph/<source-name>/<module-name>/...
153
+ knowledge/codegraph/YYYYMMDD/<module-name>/...
137
154
 
138
155
  For the current extraction flow, a multi-module parent source is used for
139
156
  inspection/planning first. Before reading code, we still need a concrete
@@ -148,8 +165,9 @@ Then ask for one of:
148
165
  - Lark/Feishu document URL.
149
166
 
150
167
  Do not ask "what is the source name?" as the first or only question. Ask what
151
- they want the knowledge source to cover, then propose a source name derived from
152
- that boundary and explain the path impact.
168
+ they want the knowledge source to cover, then use the date default. Ask for an
169
+ explicit date name only when today's source name already exists or the user
170
+ asks to override it.
153
171
 
154
172
  Good user-facing wording:
155
173
 
@@ -158,22 +176,22 @@ Next we need to add a knowledge source.
158
176
 
159
177
  If you only want a manual for the component package, choose that package
160
178
  directory as the source boundary, for example:
161
- name: component-lib
179
+ name: YYYYMMDD
162
180
  path: /repo/packages/component-lib
163
181
 
164
182
  If you want one manual for the whole subspace, choose the subspace root:
165
- name: product-ui
183
+ name: YYYYMMDD
166
184
  path: /repo/subspaces/product-ui
167
185
 
168
- The name is not just a label. It will appear in source refs such as
169
- repo:component-lib#... and in phase ids such as extract:component-lib:codegraph.
186
+ The date name is not just a label. It will appear in source refs such as
187
+ repo:YYYYMMDD#... and in phase ids such as extract:YYYYMMDD:codegraph.
170
188
  Approved paths are derived from collection, containment, and slug. NodeRef and
171
189
  ViewRef are identity fields, not path strings.
172
190
 
173
- For a unified subspace package shape, a parent source name such as `product-ui`
191
+ For a unified subspace package shape, the date source name
174
192
  lets the output group child modules under that namespace:
175
- knowledge/codegraph/product-ui/component-web/...
176
- knowledge/codegraph/product-ui/component-lynx/...
193
+ knowledge/codegraph/YYYYMMDD/component-web/...
194
+ knowledge/codegraph/YYYYMMDD/component-lynx/...
177
195
 
178
196
  Current extraction can inspect a parent source, but it should extract from a
179
197
  confirmed single package/subdirectory source. If this path is a parent source,
@@ -186,14 +204,14 @@ a supported repo source.
186
204
 
187
205
  For a local repo source, ask for:
188
206
 
189
- - source boundary and stable source name;
207
+ - source boundary;
190
208
  - local repo or package/subdirectory path;
191
209
  - remote/ref only when not inferable or when the user wants an explicit pin.
192
210
 
193
211
  After the user provides the choice, run:
194
212
 
195
213
  ```bash
196
- context source add repo <name> --local <repo-or-subdir>
214
+ context source add repo --local <repo-or-subdir>
197
215
  context source ensure
198
216
  ```
199
217
 
@@ -207,30 +225,39 @@ cloned source content.
207
225
  For local Markdown/MDX document sources, after the user confirms the boundary, run:
208
226
 
209
227
  ```bash
210
- context source add file <name> --local <file-or-folder>
228
+ context source add file --local <file-or-folder>
211
229
  ```
212
230
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
215
- `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })` in
216
- `src/index.ts`; included `_meta.json` files are route metadata, not body
217
- evidence. Use `--include` only when the approved boundary is narrower than the
218
- folder. Then explain that the next operation reads the approved document files
219
- and writes a committed snapshot under `sources/file/<name>/`. After the user
220
- confirms read permission, summarize the `src/index.ts` change or show an
221
- equivalent diff summary, and run the capture phase.
231
+ Use an explicit `<name>` only when the user has approved a non-default date
232
+ source name. Otherwise run `context source add file --local <file-or-folder>`.
233
+
234
+ Default file capture handles Markdown. If `context source add file`,
235
+ `context source inspect`, `context status`, or capture output reports that the
236
+ source looks like an MDX documentation site, stop at the source boundary gate
237
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
238
+ For MDX documentation sites that use `_meta.json` route metadata, declare
239
+ `captureFile({ source: source("<date-name>"), processor: mdxJsonDocs() })` in
240
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
241
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
242
+ `--include` only when the approved boundary is narrower than the folder. For a
243
+ long fixed batch, prefer `--include-list <file>` with one include per line;
244
+ blank lines and `#` comments are ignored. Then explain that the next operation
245
+ reads the approved document files and writes a committed snapshot under
246
+ `sources/file/YYYYMMDD/`. After the user confirms read permission, summarize the
247
+ `src/index.ts` change or show an equivalent diff summary, and run the capture
248
+ phase.
222
249
  Apply [skill-source-scope/references/capture-source.md](skill-source-scope/references/capture-source.md) for route
223
250
  selection, dependency recovery, output handling, and final reporting, using the
224
251
  current capture phase command returned by `context status`.
225
252
 
226
253
  For Lark/Feishu document sources, register the source but do not fetch content
227
254
  with ad hoc scripts. Explain which remote document or wiki token will be read,
228
- that the snapshot is written under `sources/lark/<name>/`, that committed
255
+ that the snapshot is written under `sources/lark/YYYYMMDD/`, that committed
229
256
  snapshots enable offline verify and fresh-clone reproduction, that whether to
230
257
  add extra ignore rules is a business repository decision, and that access
231
258
  credentials are not written to the workspace. Use the declared capture/align
232
259
  flow only after the user confirms remote reading. After declaring
233
- `captureLark({ source: source("<name>") })`, summarize the `src/index.ts`
260
+ `captureLark({ source: source("<date-name>") })`, summarize the `src/index.ts`
234
261
  change or show an equivalent diff summary.
235
262
  Apply [skill-source-scope/references/capture-source.md](skill-source-scope/references/capture-source.md) for route
236
263
  selection, dependency recovery, output handling, and final reporting, using the
@@ -250,14 +277,14 @@ the choices without exposing internal API names first:
250
277
  - for the current executable flow, register one package/subdirectory as its
251
278
  own source when the user wants a focused package manual;
252
279
  - if the user is designing a unified subspace knowledge base, keep the
253
- parent source name as the namespace decision, but do not run extraction until
254
- the concrete module extraction boundary is confirmed.
280
+ date source namespace as the namespace decision, but do not run extraction
281
+ until the concrete module extraction boundary is confirmed.
255
282
 
256
283
  Wait for the user to choose. If the user chooses `packages/button`, register it
257
284
  as a separate source such as:
258
285
 
259
286
  ```bash
260
- context source add repo button --local <repo>/packages/button
287
+ context source add repo --local <repo>/packages/button
261
288
  ```
262
289
 
263
290
  Do not model a monorepo package choice as `include: ["packages/button/src/**"]`
@@ -272,7 +299,7 @@ the capture summary first:
272
299
  - document count;
273
300
  - title tree, heading tree, or source span distribution from the CLI output;
274
301
  - available reading budget and evidence views;
275
- - snapshot path under `sources/file|lark/<source-name>/`;
302
+ - snapshot path under `sources/file|lark/YYYYMMDD/`;
276
303
  - the fact that approved pages are planned through
277
304
  `unapproved/structure.yaml` before compile;
278
305
  - whether the source is local file/folder evidence or Lark/Feishu evidence.
@@ -334,11 +361,11 @@ I will first generate a preview without writing candidates. The preview will
334
361
  show counts plus the planned `knowledge/` tree.
335
362
  ```
336
363
 
337
- Only after the user confirms this product-level scope, declare the chosen source
338
- with `source("<name>")`, add the TypeScript extraction phase, and add the human
339
- review phase. Use `include` only for a file-level filter within the chosen
340
- source boundary. Mention the internal API names only in code-change summaries,
341
- or when the user asks for implementation details.
364
+ Only after the user confirms this product-level scope, declare the chosen date
365
+ source with `source("YYYYMMDD")`, add the TypeScript extraction phase, and add
366
+ the human review phase. Use `include` only for a file-level filter within the
367
+ chosen source boundary. Mention the internal API names only in code-change
368
+ summaries, or when the user asks for implementation details.
342
369
 
343
370
  ### Step 5 — Show The Pre-extraction Preview
344
371
 
@@ -362,12 +389,12 @@ containment, and slug; NodeRef/ViewRef are identity fields, not path strings:
362
389
  knowledge/<collection>/<containment>/<slug>.md
363
390
  ```
364
391
 
365
- If source name, package name, module list, candidate estimate, or path shape is
366
- not what the user expects, stop and repair the source boundary or source name
392
+ If date source name, package name, module list, candidate estimate, or path shape is
393
+ not what the user expects, stop and repair the source boundary or explicit date name
367
394
  before extraction.
368
395
 
369
396
  For a single-module code source, a repeated path like
370
- `knowledge/codegraph/<source-name>/<package-name>/...` is usually a schema
397
+ `knowledge/codegraph/<date-source-name>/<package-name>/...` is usually a schema
371
398
  problem or a wrong source boundary. Stop before extraction if the preview shows
372
399
  that shape unexpectedly.
373
400