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

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 (20) hide show
  1. package/cli.js +45381 -31562
  2. package/package.json +1 -1
  3. package/plugin/skills/skill-source-scope/SKILL.md +12 -8
  4. package/plugin/skills/skill-source-scope/references/capture-source.md +15 -6
  5. package/plugins/VERSION +1 -1
  6. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  7. package/plugins/claude/skills/skill-source-scope/SKILL.md +12 -8
  8. package/plugins/claude/skills/skill-source-scope/references/capture-source.md +15 -6
  9. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  10. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +15 -6
  11. package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +12 -8
  12. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +15 -6
  13. package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +12 -8
  14. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  15. package/plugins/cursor/skills/skill-source-scope/SKILL.md +12 -8
  16. package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +15 -6
  17. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +15 -6
  18. package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +12 -8
  19. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +15 -6
  20. package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +12 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context-cli",
3
- "version": "0.6.0-alpha.1",
3
+ "version": "0.6.0-alpha.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "context": "./cli.js"
@@ -210,15 +210,19 @@ For local Markdown/MDX document sources, after the user confirms the boundary, r
210
210
  context source add file <name> --local <file-or-folder>
211
211
  ```
212
212
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
213
+ Default file capture handles Markdown. If `context source add file`,
214
+ `context source inspect`, `context status`, or capture output reports that the
215
+ source looks like an MDX documentation site, stop at the source boundary gate
216
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
217
+ For MDX documentation sites that use `_meta.json` route metadata, declare
215
218
  `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.
219
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
220
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
221
+ `--include` only when the approved boundary is narrower than the folder. Then
222
+ explain that the next operation reads the approved document files and writes a
223
+ committed snapshot under `sources/file/<name>/`. After the user confirms read
224
+ permission, summarize the `src/index.ts` change or show an equivalent diff
225
+ summary, and run the capture phase.
222
226
  Apply [references/capture-source.md](references/capture-source.md) for route
223
227
  selection, dependency recovery, output handling, and final reporting, using the
224
228
  current capture phase command returned by `context status`.
@@ -55,12 +55,21 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
55
55
  register one file source with the user-confirmed source name and boundary:
56
56
  `context source add file <name> --local <file-or-folder>`. For an explicit
57
57
  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`.
58
+ registration. Default file capture handles `.md`. If the CLI reports
59
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
60
+ stop and confirm whether the selected boundary is a documentation site before
61
+ changing capture configuration. For MDX documentation sites that use
62
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
63
+ keep `_meta.json` only when it is route metadata for the selected document
64
+ folder. The CLI captures it as metadata and generates
65
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
66
+ static MDX component props/children into `__context_mdx_component_text.md`
67
+ when components carry user-facing text. Declare
68
+ `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
69
+ run `context run capture:file:<name> --format json`. If the selected MDX page
70
+ is empty or only mounts runtime-rendered content, tell the user that capture
71
+ found a document-site shell and ask for the rendered-site or data-source
72
+ boundary instead of inventing body text.
64
73
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
74
  `context source add lark <name> --url <url>` or the matching token flag.
66
75
  Declare `captureLark({ source: source("<name>") })`, then run
package/plugins/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0-alpha.1
1
+ 0.6.0-alpha.6
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "context",
3
3
  "description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
4
- "version": "0.6.0-alpha.1",
4
+ "version": "0.6.0-alpha.6",
5
5
  "author": {
6
6
  "name": "c4a"
7
7
  },
@@ -210,15 +210,19 @@ For local Markdown/MDX document sources, after the user confirms the boundary, r
210
210
  context source add file <name> --local <file-or-folder>
211
211
  ```
212
212
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
213
+ Default file capture handles Markdown. If `context source add file`,
214
+ `context source inspect`, `context status`, or capture output reports that the
215
+ source looks like an MDX documentation site, stop at the source boundary gate
216
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
217
+ For MDX documentation sites that use `_meta.json` route metadata, declare
215
218
  `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.
219
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
220
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
221
+ `--include` only when the approved boundary is narrower than the folder. Then
222
+ explain that the next operation reads the approved document files and writes a
223
+ committed snapshot under `sources/file/<name>/`. After the user confirms read
224
+ permission, summarize the `src/index.ts` change or show an equivalent diff
225
+ summary, and run the capture phase.
222
226
  Apply [references/capture-source.md](references/capture-source.md) for route
223
227
  selection, dependency recovery, output handling, and final reporting, using the
224
228
  current capture phase command returned by `context status`.
@@ -55,12 +55,21 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
55
55
  register one file source with the user-confirmed source name and boundary:
56
56
  `context source add file <name> --local <file-or-folder>`. For an explicit
57
57
  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`.
58
+ registration. Default file capture handles `.md`. If the CLI reports
59
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
60
+ stop and confirm whether the selected boundary is a documentation site before
61
+ changing capture configuration. For MDX documentation sites that use
62
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
63
+ keep `_meta.json` only when it is route metadata for the selected document
64
+ folder. The CLI captures it as metadata and generates
65
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
66
+ static MDX component props/children into `__context_mdx_component_text.md`
67
+ when components carry user-facing text. Declare
68
+ `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
69
+ run `context run capture:file:<name> --format json`. If the selected MDX page
70
+ is empty or only mounts runtime-rendered content, tell the user that capture
71
+ found a document-site shell and ask for the rendered-site or data-source
72
+ boundary instead of inventing body text.
64
73
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
74
  `context source add lark <name> --url <url>` or the matching token flag.
66
75
  Declare `captureLark({ source: source("<name>") })`, then run
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context",
3
- "version": "0.6.0-alpha.1",
3
+ "version": "0.6.0-alpha.6",
4
4
  "description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
5
5
  "author": {
6
6
  "name": "c4a"
@@ -18,7 +18,7 @@
18
18
  "skills": "./skills/",
19
19
  "interface": {
20
20
  "displayName": "C4A Context",
21
- "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.0-alpha.1",
21
+ "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.0-alpha.6",
22
22
  "longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
23
23
  "developerName": "c4a",
24
24
  "category": "Productivity",
@@ -55,12 +55,21 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
55
55
  register one file source with the user-confirmed source name and boundary:
56
56
  `context source add file <name> --local <file-or-folder>`. For an explicit
57
57
  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`.
58
+ registration. Default file capture handles `.md`. If the CLI reports
59
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
60
+ stop and confirm whether the selected boundary is a documentation site before
61
+ changing capture configuration. For MDX documentation sites that use
62
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
63
+ keep `_meta.json` only when it is route metadata for the selected document
64
+ folder. The CLI captures it as metadata and generates
65
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
66
+ static MDX component props/children into `__context_mdx_component_text.md`
67
+ when components carry user-facing text. Declare
68
+ `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
69
+ run `context run capture:file:<name> --format json`. If the selected MDX page
70
+ is empty or only mounts runtime-rendered content, tell the user that capture
71
+ found a document-site shell and ask for the rendered-site or data-source
72
+ boundary instead of inventing body text.
64
73
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
74
  `context source add lark <name> --url <url>` or the matching token flag.
66
75
  Declare `captureLark({ source: source("<name>") })`, then run
@@ -210,15 +210,19 @@ For local Markdown/MDX document sources, after the user confirms the boundary, r
210
210
  context source add file <name> --local <file-or-folder>
211
211
  ```
212
212
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
213
+ Default file capture handles Markdown. If `context source add file`,
214
+ `context source inspect`, `context status`, or capture output reports that the
215
+ source looks like an MDX documentation site, stop at the source boundary gate
216
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
217
+ For MDX documentation sites that use `_meta.json` route metadata, declare
215
218
  `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.
219
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
220
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
221
+ `--include` only when the approved boundary is narrower than the folder. Then
222
+ explain that the next operation reads the approved document files and writes a
223
+ committed snapshot under `sources/file/<name>/`. After the user confirms read
224
+ permission, summarize the `src/index.ts` change or show an equivalent diff
225
+ summary, and run the capture phase.
222
226
  Apply [skill-source-scope/references/capture-source.md](skill-source-scope/references/capture-source.md) for route
223
227
  selection, dependency recovery, output handling, and final reporting, using the
224
228
  current capture phase command returned by `context status`.
@@ -55,12 +55,21 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
55
55
  register one file source with the user-confirmed source name and boundary:
56
56
  `context source add file <name> --local <file-or-folder>`. For an explicit
57
57
  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`.
58
+ registration. Default file capture handles `.md`. If the CLI reports
59
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
60
+ stop and confirm whether the selected boundary is a documentation site before
61
+ changing capture configuration. For MDX documentation sites that use
62
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
63
+ keep `_meta.json` only when it is route metadata for the selected document
64
+ folder. The CLI captures it as metadata and generates
65
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
66
+ static MDX component props/children into `__context_mdx_component_text.md`
67
+ when components carry user-facing text. Declare
68
+ `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
69
+ run `context run capture:file:<name> --format json`. If the selected MDX page
70
+ is empty or only mounts runtime-rendered content, tell the user that capture
71
+ found a document-site shell and ask for the rendered-site or data-source
72
+ boundary instead of inventing body text.
64
73
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
74
  `context source add lark <name> --url <url>` or the matching token flag.
66
75
  Declare `captureLark({ source: source("<name>") })`, then run
@@ -210,15 +210,19 @@ For local Markdown/MDX document sources, after the user confirms the boundary, r
210
210
  context source add file <name> --local <file-or-folder>
211
211
  ```
212
212
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
213
+ Default file capture handles Markdown. If `context source add file`,
214
+ `context source inspect`, `context status`, or capture output reports that the
215
+ source looks like an MDX documentation site, stop at the source boundary gate
216
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
217
+ For MDX documentation sites that use `_meta.json` route metadata, declare
215
218
  `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.
219
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
220
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
221
+ `--include` only when the approved boundary is narrower than the folder. Then
222
+ explain that the next operation reads the approved document files and writes a
223
+ committed snapshot under `sources/file/<name>/`. After the user confirms read
224
+ permission, summarize the `src/index.ts` change or show an equivalent diff
225
+ summary, and run the capture phase.
222
226
  Apply [skill-source-scope/references/capture-source.md](skill-source-scope/references/capture-source.md) for route
223
227
  selection, dependency recovery, output handling, and final reporting, using the
224
228
  current capture phase command returned by `context status`.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "context",
3
3
  "displayName": "C4A Context",
4
- "version": "0.6.0-alpha.1",
4
+ "version": "0.6.0-alpha.6",
5
5
  "description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
6
6
  "author": {
7
7
  "name": "Context4AI",
@@ -210,15 +210,19 @@ For local Markdown/MDX document sources, after the user confirms the boundary, r
210
210
  context source add file <name> --local <file-or-folder>
211
211
  ```
212
212
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
213
+ Default file capture handles Markdown. If `context source add file`,
214
+ `context source inspect`, `context status`, or capture output reports that the
215
+ source looks like an MDX documentation site, stop at the source boundary gate
216
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
217
+ For MDX documentation sites that use `_meta.json` route metadata, declare
215
218
  `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.
219
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
220
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
221
+ `--include` only when the approved boundary is narrower than the folder. Then
222
+ explain that the next operation reads the approved document files and writes a
223
+ committed snapshot under `sources/file/<name>/`. After the user confirms read
224
+ permission, summarize the `src/index.ts` change or show an equivalent diff
225
+ summary, and run the capture phase.
222
226
  Apply [references/capture-source.md](references/capture-source.md) for route
223
227
  selection, dependency recovery, output handling, and final reporting, using the
224
228
  current capture phase command returned by `context status`.
@@ -55,12 +55,21 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
55
55
  register one file source with the user-confirmed source name and boundary:
56
56
  `context source add file <name> --local <file-or-folder>`. For an explicit
57
57
  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`.
58
+ registration. Default file capture handles `.md`. If the CLI reports
59
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
60
+ stop and confirm whether the selected boundary is a documentation site before
61
+ changing capture configuration. For MDX documentation sites that use
62
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
63
+ keep `_meta.json` only when it is route metadata for the selected document
64
+ folder. The CLI captures it as metadata and generates
65
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
66
+ static MDX component props/children into `__context_mdx_component_text.md`
67
+ when components carry user-facing text. Declare
68
+ `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
69
+ run `context run capture:file:<name> --format json`. If the selected MDX page
70
+ is empty or only mounts runtime-rendered content, tell the user that capture
71
+ found a document-site shell and ask for the rendered-site or data-source
72
+ boundary instead of inventing body text.
64
73
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
74
  `context source add lark <name> --url <url>` or the matching token flag.
66
75
  Declare `captureLark({ source: source("<name>") })`, then run
@@ -55,12 +55,21 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
55
55
  register one file source with the user-confirmed source name and boundary:
56
56
  `context source add file <name> --local <file-or-folder>`. For an explicit
57
57
  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`.
58
+ registration. Default file capture handles `.md`. If the CLI reports
59
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
60
+ stop and confirm whether the selected boundary is a documentation site before
61
+ changing capture configuration. For MDX documentation sites that use
62
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
63
+ keep `_meta.json` only when it is route metadata for the selected document
64
+ folder. The CLI captures it as metadata and generates
65
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
66
+ static MDX component props/children into `__context_mdx_component_text.md`
67
+ when components carry user-facing text. Declare
68
+ `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
69
+ run `context run capture:file:<name> --format json`. If the selected MDX page
70
+ is empty or only mounts runtime-rendered content, tell the user that capture
71
+ found a document-site shell and ask for the rendered-site or data-source
72
+ boundary instead of inventing body text.
64
73
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
74
  `context source add lark <name> --url <url>` or the matching token flag.
66
75
  Declare `captureLark({ source: source("<name>") })`, then run
@@ -210,15 +210,19 @@ For local Markdown/MDX document sources, after the user confirms the boundary, r
210
210
  context source add file <name> --local <file-or-folder>
211
211
  ```
212
212
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
213
+ Default file capture handles Markdown. If `context source add file`,
214
+ `context source inspect`, `context status`, or capture output reports that the
215
+ source looks like an MDX documentation site, stop at the source boundary gate
216
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
217
+ For MDX documentation sites that use `_meta.json` route metadata, declare
215
218
  `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.
219
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
220
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
221
+ `--include` only when the approved boundary is narrower than the folder. Then
222
+ explain that the next operation reads the approved document files and writes a
223
+ committed snapshot under `sources/file/<name>/`. After the user confirms read
224
+ permission, summarize the `src/index.ts` change or show an equivalent diff
225
+ summary, and run the capture phase.
222
226
  Apply [skill-source-scope/references/capture-source.md](skill-source-scope/references/capture-source.md) for route
223
227
  selection, dependency recovery, output handling, and final reporting, using the
224
228
  current capture phase command returned by `context status`.
@@ -55,12 +55,21 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
55
55
  register one file source with the user-confirmed source name and boundary:
56
56
  `context source add file <name> --local <file-or-folder>`. For an explicit
57
57
  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`.
58
+ registration. Default file capture handles `.md`. If the CLI reports
59
+ document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
60
+ stop and confirm whether the selected boundary is a documentation site before
61
+ changing capture configuration. For MDX documentation sites that use
62
+ `_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
63
+ keep `_meta.json` only when it is route metadata for the selected document
64
+ folder. The CLI captures it as metadata and generates
65
+ `__context_route_metadata.md` as mechanical route evidence; it also extracts
66
+ static MDX component props/children into `__context_mdx_component_text.md`
67
+ when components carry user-facing text. Declare
68
+ `captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
69
+ run `context run capture:file:<name> --format json`. If the selected MDX page
70
+ is empty or only mounts runtime-rendered content, tell the user that capture
71
+ found a document-site shell and ask for the rendered-site or data-source
72
+ boundary instead of inventing body text.
64
73
  - A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
65
74
  `context source add lark <name> --url <url>` or the matching token flag.
66
75
  Declare `captureLark({ source: source("<name>") })`, then run
@@ -210,15 +210,19 @@ For local Markdown/MDX document sources, after the user confirms the boundary, r
210
210
  context source add file <name> --local <file-or-folder>
211
211
  ```
212
212
 
213
- Default file capture handles Markdown. For MDX documentation sites that use
214
- `_meta.json` route metadata, declare
213
+ Default file capture handles Markdown. If `context source add file`,
214
+ `context source inspect`, `context status`, or capture output reports that the
215
+ source looks like an MDX documentation site, stop at the source boundary gate
216
+ and ask the user to confirm that interpretation before changing `src/index.ts`.
217
+ For MDX documentation sites that use `_meta.json` route metadata, declare
215
218
  `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.
219
+ `src/index.ts`; included `_meta.json` files are route metadata, and the CLI
220
+ generates `__context_route_metadata.md` as mechanical route evidence. Use
221
+ `--include` only when the approved boundary is narrower than the folder. Then
222
+ explain that the next operation reads the approved document files and writes a
223
+ committed snapshot under `sources/file/<name>/`. After the user confirms read
224
+ permission, summarize the `src/index.ts` change or show an equivalent diff
225
+ summary, and run the capture phase.
222
226
  Apply [skill-source-scope/references/capture-source.md](skill-source-scope/references/capture-source.md) for route
223
227
  selection, dependency recovery, output handling, and final reporting, using the
224
228
  current capture phase command returned by `context status`.