@c4a/context-cli 0.7.43 → 0.7.55
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/cli.js +3105 -1769
- package/evidence/context-evidence.sourcegraph.wasm +0 -0
- package/evidence/manifest.json +2 -1
- package/indexers/bundles/context-markdown-indexer/SKILL.md +6 -0
- package/indexers/contracts/profile-contract.json +245 -245
- package/indexers/release-manifest.json +3 -3
- package/package.json +12 -12
- package/parserEntryWorker.js +70 -0
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +3 -2
- package/plugins/claude/commands/context-inspect-search.md +101 -32
- package/plugins/claude/commands/context-repo-content.md +10 -0
- package/plugins/claude/commands/context.md +343 -266
- package/plugins/claude/resources/context/imports.md +87 -0
- package/plugins/claude/resources/context/local-install.md +21 -0
- package/plugins/claude/skills/context-inspect-search/SKILL.md +101 -32
- package/plugins/claude/skills/context-plan/SKILL.md +7 -0
- package/plugins/claude/skills/context-repo-content/SKILL.md +63 -0
- package/plugins/claude/skills/context-repo-content/references/document-outlines.md +17 -0
- package/plugins/claude/skills/context-repo-content/references/registration.md +48 -0
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +343 -266
- package/plugins/codex/skills/context/references/imports.md +87 -0
- package/plugins/codex/skills/context/references/local-install.md +21 -0
- package/plugins/codex/skills/context-inspect-search/SKILL.md +101 -32
- package/plugins/codex/skills/context-plan/SKILL.md +7 -0
- package/plugins/codex/skills/context-repo-content/SKILL.md +62 -0
- package/plugins/codex/skills/context-repo-content/references/document-outlines.md +17 -0
- package/plugins/codex/skills/context-repo-content/references/registration.md +48 -0
- package/plugins/cursor/.cursor-plugin/plugin.json +3 -2
- package/plugins/cursor/commands/c4a-context-inspect-search.md +101 -32
- package/plugins/cursor/commands/c4a-context-repo-content.md +9 -0
- package/plugins/cursor/commands/c4a-context.md +343 -266
- package/plugins/cursor/resources/context/imports.md +87 -0
- package/plugins/cursor/resources/context/local-install.md +21 -0
- package/plugins/cursor/skills/context-inspect-search/SKILL.md +101 -32
- package/plugins/cursor/skills/context-plan/SKILL.md +7 -0
- package/plugins/cursor/skills/context-repo-content/SKILL.md +63 -0
- package/plugins/cursor/skills/context-repo-content/references/document-outlines.md +17 -0
- package/plugins/cursor/skills/context-repo-content/references/registration.md +48 -0
- package/plugins/skills/context/SKILL.md +343 -266
- package/plugins/skills/context/references/imports.md +87 -0
- package/plugins/skills/context/references/local-install.md +21 -0
- package/plugins/skills/context-inspect-search/SKILL.md +101 -32
- package/plugins/skills/context-markdown-indexer/SKILL.md +6 -0
- package/plugins/skills/context-plan/SKILL.md +7 -0
- package/plugins/skills/context-repo-content/SKILL.md +62 -0
- package/plugins/skills/context-repo-content/references/document-outlines.md +17 -0
- package/plugins/skills/context-repo-content/references/registration.md +48 -0
- package/providers/context/actions/repair-project-entry.yaml +2 -0
- package/providers/context/manifest.json +18 -10
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/manuals/guides/imports.md +90 -0
- package/providers/context/resources/manuals/guides/knowledge-updates.md +24 -0
- package/providers/context/resources/manuals/guides/package-outputs.md +13 -0
- package/providers/context/resources/manuals/guides/repo-content.md +77 -0
- package/providers/context/resources/procedures/knowledge-updates.md +24 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.sdk.imports
|
|
3
|
+
kind: procedure
|
|
4
|
+
mediaType: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# External associations
|
|
8
|
+
|
|
9
|
+
Workspace-root `imports.yaml` declares external entrances without downloading,
|
|
10
|
+
installing or capturing their contents. Maintain it through the Context entry when
|
|
11
|
+
the task requests a lasting association. Temporary query reads do not register
|
|
12
|
+
dependencies. Same-repository authored documents and Skills use
|
|
13
|
+
[repo-content](repo-content.md) instead.
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
protocol: context.imports/v1
|
|
17
|
+
imports:
|
|
18
|
+
engineering-guide:
|
|
19
|
+
kind: knowledge
|
|
20
|
+
url: https://docs.example.org/engineering/
|
|
21
|
+
description: Engineering conventions
|
|
22
|
+
release-check:
|
|
23
|
+
kind: skill
|
|
24
|
+
url: https://github.com/example/skills/tree/v1/skills/release-check
|
|
25
|
+
path: skills/release-check
|
|
26
|
+
version: v1
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The stable ID and `url` are required. `kind`, `format`, `title`, `description`,
|
|
30
|
+
`path` and `version` are optional. Kind and format are open strings; versions are
|
|
31
|
+
opaque hints, not necessarily SemVer. Paths are source-relative without traversal.
|
|
32
|
+
Reader URLs must be HTTP(S), without credentials or whitespace; this is local
|
|
33
|
+
syntax validation, not a provider whitelist or availability check. Do not put
|
|
34
|
+
access tokens in query strings. The SDK exports `importsRegistrySchema` for local
|
|
35
|
+
validation. Unknown providers and offline operation do not cause network checks.
|
|
36
|
+
|
|
37
|
+
Use a new ID when replacing the source identity. A declaration is neither proof
|
|
38
|
+
of reading nor an installation record. Do not expand transitive imports or infer
|
|
39
|
+
permission from a readable service. Only relevant originals are read through
|
|
40
|
+
existing host tools. Installed capability identity belongs to the host, not a
|
|
41
|
+
Context lock file.
|
|
42
|
+
|
|
43
|
+
## Entrances and evidence
|
|
44
|
+
|
|
45
|
+
An import is a reader entrance, not recorded evidence. It adds no entry to
|
|
46
|
+
`knowledge/structure.yaml` `references[]`, produces no review hint and has no
|
|
47
|
+
`import:` reference format. When an article's conclusion must be traceable or
|
|
48
|
+
tracked for change, register the needed external content as a source and capture
|
|
49
|
+
it; the import can remain as the reader entrance.
|
|
50
|
+
|
|
51
|
+
The CLI never contacts providers or compares versions. When asked to update or
|
|
52
|
+
check imports, the Agent observes current versions with existing authorized host
|
|
53
|
+
tools and compares them with `version`. Unreachable, unauthorized or failed checks
|
|
54
|
+
are reported as "version unknown" and are never treated as a change.
|
|
55
|
+
|
|
56
|
+
## Links and output
|
|
57
|
+
|
|
58
|
+
`[Engineering guide](context:import/engineering-guide)` in an article projects to
|
|
59
|
+
the declared URL. Build never guesses a provider-specific URL, appends `path` or
|
|
60
|
+
rewrites the version. Use an entrance that already opens the intended target.
|
|
61
|
+
Missing IDs keep the reader label as non-clickable text and produce a build link
|
|
62
|
+
warning. An invalid or unreadable declaration skips the optional directory and
|
|
63
|
+
degrades affected links the same way; unrelated outputs still build. Correct
|
|
64
|
+
`imports.yaml` or the article link to restore navigation. Merely registering
|
|
65
|
+
entries emits no page.
|
|
66
|
+
|
|
67
|
+
For an optional declaration-only directory:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
kbPackage({
|
|
71
|
+
name: "handbook",
|
|
72
|
+
template: { path: "src/package-templates/kb" },
|
|
73
|
+
importsPage: true,
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This generates `wikis/imports.md` and includes it in package navigation. With an
|
|
78
|
+
existing `site` configuration, `importsPage: { site: true }` also adds a website
|
|
79
|
+
navigation item. `false` or omission disables generation. Initialization enables
|
|
80
|
+
the package directory when a valid `imports.yaml` already exists. An invalid
|
|
81
|
+
declaration is preserved with a warning; initialization continues without enabling
|
|
82
|
+
that directory. When first configuring
|
|
83
|
+
a new workspace's KB later, enable it if the declaration is present; preserve
|
|
84
|
+
existing settings and explicit user choices. The directory contains only declared metadata,
|
|
85
|
+
not approved article bodies or installation commands. Check audience suitability
|
|
86
|
+
before exposing private entrances.
|
|
87
|
+
|
|
88
|
+
Navigation links are not source evidence. Imports declaration support alone does
|
|
89
|
+
not authorize fabricated `import:` fragment references or advancement of article
|
|
90
|
+
evidence baselines.
|
|
@@ -24,6 +24,30 @@ actual behavior, a confirmed decision, and a proposal that is not implemented.
|
|
|
24
24
|
|
|
25
25
|
## Keep planning local to the change
|
|
26
26
|
|
|
27
|
+
Same-repository originals use `repo-content.yaml` rather than another capture.
|
|
28
|
+
For editing/registering them, use the `context-repo-content` Skill without
|
|
29
|
+
starting production. An explicitly requested source update can select
|
|
30
|
+
`repo-content:<entry-id>` in its confirmed requirement and update scope. The
|
|
31
|
+
prepared update includes current local changes and chapter impact candidates.
|
|
32
|
+
Docs compare cited regions; Skills compare the whole owning Skill directory,
|
|
33
|
+
including untracked additions. Missing historical objects are unknown, not an
|
|
34
|
+
empty diff. Inspect/edit does not advance references; delivery or an explicit
|
|
35
|
+
no-impact outcome settles the selected scope. Historical locators always store
|
|
36
|
+
the real repository path at the cited commit, not today's registration path.
|
|
37
|
+
|
|
38
|
+
External associations in `imports.yaml` are entrances, not recorded evidence:
|
|
39
|
+
they create no `references[]` and no review hints, and the CLI never checks
|
|
40
|
+
their versions. When the user asks to update or check external associations,
|
|
41
|
+
use existing authorized Host tools (for example `git ls-remote`, a package
|
|
42
|
+
manager or a web read) to observe each selected entry's current version and
|
|
43
|
+
compare it with its optional `version`. If it differs, read only what the
|
|
44
|
+
linked articles rely on, report whether they need revision and update
|
|
45
|
+
`version` once settled. Unreachable, unauthorized or failed checks are
|
|
46
|
+
"version unknown": report them, keep `version` unchanged, and never treat them
|
|
47
|
+
as changed. When an article's conclusion must trace or track external content,
|
|
48
|
+
register the needed part as a source and capture it; do not cite the
|
|
49
|
+
association itself as evidence.
|
|
50
|
+
|
|
27
51
|
Before starting production, compare the proposed content with the workspace's
|
|
28
52
|
reader purpose. For clearly unrelated anecdotes or personal rankings, briefly
|
|
29
53
|
recommend leaving them out of the formal manual or saving them separately because
|
|
@@ -23,6 +23,19 @@ package index, and section fingerprint rebuilds are not current close output.
|
|
|
23
23
|
|
|
24
24
|
## Default New-Workspace Outputs: Knowledge Base + Website
|
|
25
25
|
|
|
26
|
+
Same-repository originals have an optional [repository entrance](repo-content.md):
|
|
27
|
+
`repoContentPage: true` in a KB declaration projects README and Skill summaries,
|
|
28
|
+
not the full document tree. It does not expose that page on a configured website;
|
|
29
|
+
use `repoContentPage: { site: true }` to opt in. Existing declarations are kept.
|
|
30
|
+
|
|
31
|
+
External associations have an optional [directory](imports.md): `importsPage: true`
|
|
32
|
+
generates `wikis/imports.md` from declarations only; `{ site: true }` also exposes
|
|
33
|
+
it on a configured website. Neither option downloads or installs external content.
|
|
34
|
+
|
|
35
|
+
When first declaring a KB for a new workspace, enable `repoContentPage: true`
|
|
36
|
+
if `repo-content.yaml` exists and `importsPage: true` if `imports.yaml` exists.
|
|
37
|
+
Keep existing package settings and explicit user choices; website exposure stays opt-in.
|
|
38
|
+
|
|
26
39
|
Output channels support multiple selection. In a new workspace without explicit
|
|
27
40
|
preferences, the Agent proposes and configures KB + website as the default. Honor
|
|
28
41
|
user feedback, session authority and existing workspace declarations; LLMS is an
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.sdk.repo-content
|
|
3
|
+
kind: procedure
|
|
4
|
+
mediaType: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Same-repository content
|
|
8
|
+
|
|
9
|
+
Keep project documentation and authored Skills at their original locations.
|
|
10
|
+
Context registers an entrance without copying their bodies to knowledge or
|
|
11
|
+
source snapshots. For selection and editing use `context-repo-content`.
|
|
12
|
+
|
|
13
|
+
At the Context workspace root, create `repo-content.yaml`:
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
protocol: context.repo-content/v1
|
|
17
|
+
entries:
|
|
18
|
+
docs:
|
|
19
|
+
kind: docs
|
|
20
|
+
path: docs
|
|
21
|
+
tools:
|
|
22
|
+
kind: skills
|
|
23
|
+
path: .agents/skills
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Paths are Git-root-relative, not workspace-relative. Kinds are `docs`,
|
|
27
|
+
`document`, `skills`, and `skill`. Optional `group` is one module level;
|
|
28
|
+
`mount` overrides the default `[group/]<basename>`. Optional `exclude` globs
|
|
29
|
+
are relative to the entry; they are not access control. Overlapping entries,
|
|
30
|
+
outside targets, nested repositories and cycles are rejected.
|
|
31
|
+
|
|
32
|
+
`context source ensure repo-content --format json` maintains relative symlinks
|
|
33
|
+
in `repo-content/`; `source inspect repo-content` and `status` inspect without
|
|
34
|
+
repairing. Ordinary files are not overwritten. With disabled symlinks, search
|
|
35
|
+
real paths from the registry rather than reading Git placeholders. No Git
|
|
36
|
+
configuration or index is changed. Registry and relative links can be committed
|
|
37
|
+
by the user; originals remain the only authoring location.
|
|
38
|
+
|
|
39
|
+
Invalid registration is advisory in `status` and automatic pre-operation link
|
|
40
|
+
maintenance: correct `repo-content.yaml`; existing links are left unchanged.
|
|
41
|
+
The repair command is suggested only for missing or misdirected symlinks, not
|
|
42
|
+
invalid registration, missing targets, ordinary-file conflicts or disabled
|
|
43
|
+
symlinks. Fix those reported conditions rather than repeatedly running ensure.
|
|
44
|
+
Explicit repository-content updates and `context build` require valid
|
|
45
|
+
registration. An invalid registry stops build before replacing existing package
|
|
46
|
+
outputs; it is not treated as an empty registry. Missing source files and
|
|
47
|
+
unavailable Git objects follow the documented fallback behavior instead.
|
|
48
|
+
|
|
49
|
+
Article navigation uses `[Guide](context:repo/docs/guide.md)`. Build projects
|
|
50
|
+
this to an upstream link when available, otherwise a plain location. Evidence
|
|
51
|
+
instead records `repo-content:docs@<full-commit>` plus real historical path,
|
|
52
|
+
line range and content digest. Uncommitted evidence uses `<commit>+worktree`.
|
|
53
|
+
The evidence Wasm supports these references without treating their existence
|
|
54
|
+
as proof that the source was read in the current query.
|
|
55
|
+
|
|
56
|
+
## Optional entrance page
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
kbPackage({
|
|
60
|
+
name: "project-kb",
|
|
61
|
+
template: { path: "src/package-templates/kb" },
|
|
62
|
+
repoContentPage: true,
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
SDK default is off. New initialization with an existing nonempty registry
|
|
67
|
+
creates a KB declaration with the entrance enabled; existing declarations are
|
|
68
|
+
preserved. It projects a group's README and Skill names/descriptions under
|
|
69
|
+
`wikis/repo-content.md` and optional group pages, not all docs or Skill scripts.
|
|
70
|
+
HEAD objects are preferred without network fetching, with declared worktree
|
|
71
|
+
fallback when unavailable. Review README sensitivity before exposing it.
|
|
72
|
+
With a configured website, `{ site: true }` opts into a top-level site entrance;
|
|
73
|
+
plain `true` keeps these pages out of the site.
|
|
74
|
+
|
|
75
|
+
Other repositories and externally installed Skills are not same-repository
|
|
76
|
+
content. Registering an entrance does not imply installation, execution,
|
|
77
|
+
production or publication authority.
|
|
@@ -24,6 +24,30 @@ actual behavior, a confirmed decision, and a proposal that is not implemented.
|
|
|
24
24
|
|
|
25
25
|
## Keep planning local to the change
|
|
26
26
|
|
|
27
|
+
Same-repository originals use `repo-content.yaml` rather than another capture.
|
|
28
|
+
For editing/registering them, use the `context-repo-content` Skill without
|
|
29
|
+
starting production. An explicitly requested source update can select
|
|
30
|
+
`repo-content:<entry-id>` in its confirmed requirement and update scope. The
|
|
31
|
+
prepared update includes current local changes and chapter impact candidates.
|
|
32
|
+
Docs compare cited regions; Skills compare the whole owning Skill directory,
|
|
33
|
+
including untracked additions. Missing historical objects are unknown, not an
|
|
34
|
+
empty diff. Inspect/edit does not advance references; delivery or an explicit
|
|
35
|
+
no-impact outcome settles the selected scope. Historical locators always store
|
|
36
|
+
the real repository path at the cited commit, not today's registration path.
|
|
37
|
+
|
|
38
|
+
External associations in `imports.yaml` are entrances, not recorded evidence:
|
|
39
|
+
they create no `references[]` and no review hints, and the CLI never checks
|
|
40
|
+
their versions. When the user asks to update or check external associations,
|
|
41
|
+
use existing authorized Host tools (for example `git ls-remote`, a package
|
|
42
|
+
manager or a web read) to observe each selected entry's current version and
|
|
43
|
+
compare it with its optional `version`. If it differs, read only what the
|
|
44
|
+
linked articles rely on, report whether they need revision and update
|
|
45
|
+
`version` once settled. Unreachable, unauthorized or failed checks are
|
|
46
|
+
"version unknown": report them, keep `version` unchanged, and never treat them
|
|
47
|
+
as changed. When an article's conclusion must trace or track external content,
|
|
48
|
+
register the needed part as a source and capture it; do not cite the
|
|
49
|
+
association itself as evidence.
|
|
50
|
+
|
|
27
51
|
Before starting production, compare the proposed content with the workspace's
|
|
28
52
|
reader purpose. For clearly unrelated anecdotes or personal rankings, briefly
|
|
29
53
|
recommend leaving them out of the formal manual or saving them separately because
|