@c4a/context-cli 0.7.10-alpha.2 → 0.7.11

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 (68) hide show
  1. package/README.md +2 -2
  2. package/README.zh-CN.md +3 -3
  3. package/cli.js +2034 -925
  4. package/indexers/bundles/context-code-indexer/references/indexer.md +25 -1
  5. package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +1 -1
  6. package/indexers/bundles/context-code-indexer/templates/api-service.md +1 -1
  7. package/indexers/bundles/context-code-indexer/templates/background-runtime.md +1 -1
  8. package/indexers/bundles/context-code-indexer/templates/cli-tool.md +1 -1
  9. package/indexers/bundles/context-code-indexer/templates/component-library.md +4 -4
  10. package/indexers/bundles/context-code-indexer/templates/contract-source.md +1 -1
  11. package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation.md +6 -8
  12. package/indexers/bundles/context-code-indexer/templates/domain-service.md +1 -1
  13. package/indexers/bundles/context-code-indexer/templates/monorepo-container.md +1 -1
  14. package/indexers/bundles/context-code-indexer/templates/sdk-library.md +1 -2
  15. package/indexers/bundles/context-code-indexer/templates/web-application.md +1 -1
  16. package/indexers/bundles/context-markdown-indexer/references/indexer.md +7 -2
  17. package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +9 -6
  18. package/indexers/contracts/profile-contract.json +245 -245
  19. package/indexers/release-manifest.json +17 -17
  20. package/package.json +12 -12
  21. package/parserEntryWorker.js +43 -10
  22. package/plugins/README.md +1 -1
  23. package/plugins/README_CN.md +1 -1
  24. package/plugins/VERSION +1 -1
  25. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  26. package/plugins/claude/commands/context.md +37 -73
  27. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  28. package/plugins/codex/skills/context/SKILL.md +37 -73
  29. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  30. package/plugins/cursor/commands/c4a-context.md +37 -73
  31. package/plugins/skills/context/SKILL.md +37 -73
  32. package/plugins/skills/context-code-indexer/references/indexer.md +25 -1
  33. package/plugins/skills/context-code-indexer/templates/adapter-integration.md +1 -1
  34. package/plugins/skills/context-code-indexer/templates/api-service.md +1 -1
  35. package/plugins/skills/context-code-indexer/templates/background-runtime.md +1 -1
  36. package/plugins/skills/context-code-indexer/templates/cli-tool.md +1 -1
  37. package/plugins/skills/context-code-indexer/templates/component-library.md +4 -4
  38. package/plugins/skills/context-code-indexer/templates/contract-source.md +1 -1
  39. package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation.md +6 -8
  40. package/plugins/skills/context-code-indexer/templates/domain-service.md +1 -1
  41. package/plugins/skills/context-code-indexer/templates/monorepo-container.md +1 -1
  42. package/plugins/skills/context-code-indexer/templates/sdk-library.md +1 -2
  43. package/plugins/skills/context-code-indexer/templates/web-application.md +1 -1
  44. package/plugins/skills/context-markdown-indexer/references/indexer.md +7 -2
  45. package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +9 -6
  46. package/providers/context/graphs/workspace.yaml +1 -22
  47. package/providers/context/manifest.json +34 -70
  48. package/providers/context/provider.yaml +1 -1
  49. package/providers/context/resources/manuals/guides/indexer-provider-and-customization.md +0 -2
  50. package/providers/context/resources/manuals/guides/knowledge-updates.md +108 -5
  51. package/providers/context/resources/manuals/guides/package-outputs.md +39 -1
  52. package/providers/context/resources/manuals/guides/workspace-prepare.md +17 -0
  53. package/providers/context/resources/manuals/reference/project-api.md +58 -19
  54. package/providers/context/resources/procedures/close-and-build.md +21 -0
  55. package/providers/context/resources/procedures/knowledge-review.md +18 -2
  56. package/providers/context/resources/procedures/knowledge-updates.md +108 -5
  57. package/providers/context/resources/procedures/package-output.md +18 -0
  58. package/providers/context/resources/procedures/production-stage-files.md +35 -0
  59. package/providers/context/resources/procedures/repository-source-recovery.md +5 -3
  60. package/providers/context/resources/procedures/source-capture-detailed.md +16 -2
  61. package/providers/context/resources/procedures/task-recovery.md +6 -0
  62. package/providers/context/resources/procedures/work-start-report.md +24 -11
  63. package/providers/context/resources/procedures/workspace-prepare.md +17 -0
  64. package/providers/context/resources/templates/work-start-report.md +11 -6
  65. package/providers/context/actions/inspect-repository-recovery.yaml +0 -6
  66. package/providers/context/actions/restore-repository-sources.yaml +0 -7
  67. package/providers/context/resources/dialogue/repository-source-recovery.md +0 -23
  68. package/providers/context/schemas/repository-source-recovery.schema.json +0 -40
@@ -7,6 +7,9 @@ and file navigation is a starting point, not a semantic grouping or a complete
7
7
  feature inventory. Inspect relevant manifests, public entry files, registrations,
8
8
  maintained documentation or a few representative declarations to understand
9
9
  which kinds of reader topics the module can support.
10
+ For broad work, identify the main capability families across the authorized
11
+ range before treating investigation as finished. A representative implementation
12
+ can establish how to investigate a family, not that every family is covered.
10
13
 
11
14
  Technology-specific investigation may be direct Agent reading or a bounded
12
15
  helper from an available skill. A helper should expose feature names, counts
@@ -51,6 +54,9 @@ supply better business names and rationale; code paths are structural hints,
51
54
  not immutable topic names. Preserve stable article identity when the reader
52
55
  task is unchanged. Different platforms or deprecated entrypoints may need
53
56
  separate treatment even when names match.
57
+ Before consolidating existing articles, read their relevant content. Preserve
58
+ checked interfaces, relationships and examples; a shorter map must not replace
59
+ them with instructions to rediscover the same knowledge.
54
60
 
55
61
  Submit article targets, reader questions, sources and batches with the current
56
62
  plan schema. Keep pending scope explicit when only part is investigated.
@@ -61,11 +67,29 @@ returned action; accepted content needs a revision task.
61
67
 
62
68
  ## Writing follows actual behavior
63
69
 
70
+ For a large module, divide work by reader question or capability family, not
71
+ by an exhaustive symbol list. Put useful directory and entrypoint hints in the
72
+ task brief. Investigate one bounded slice first and keep remaining scope in the
73
+ existing plan; do not wait for a module-wide catalog before writing. Reuse shared
74
+ findings in temporary files across related tasks, checking source evidence for
75
+ new claims. If a task proves too broad, amend unfinished tasks rather than
76
+ expanding every dependency recursively. A complete component manual still needs
77
+ coverage of its agreed components, spread across manageable tasks.
78
+
79
+ Use explicit file selections for optional deep analysis. Package export tracing
80
+ can still follow other files to establish public identity, so selected output
81
+ does not guarantee a cheap scan. Prefer direct reading when that traversal is
82
+ unnecessary; stop or narrow a helper that exceeds the useful time/output budget.
83
+
64
84
  Explain what the module is responsible for, when and how to enter it through
65
85
  stable interfaces, what it hands off, and the relevant state and failure
66
86
  boundaries. A directory summary or symbol list is not an explanation.
67
87
  An integration guide focuses on consumption; a maintenance guide may need
68
- internal transformations and recovery. Follow the actual reader purpose.
88
+ internal transformations and recovery. For an entry-first task, provide a checked
89
+ file or symbol, why it is relevant and a concrete next hop; a package name or
90
+ generic instruction to search pages/handlers is not a problem-level entry.
91
+ For an explanation, read the conditions, callers and implementation needed to
92
+ answer it instead of substituting that investigation route for the answer.
69
93
 
70
94
  Read the source that establishes the claim. An outbound client is not an
71
95
  inbound service; host and remote declarations do not prove loading behavior.
@@ -11,7 +11,7 @@ compatibility layers, gateways, and translators whose stable responsibility is
11
11
  to connect two boundaries. An ordinary internal helper that converts one object
12
12
  is not automatically an adapter module.
13
13
 
14
- Use the exact profile and Artifact policy variant supplied by the workset. For
14
+ Follow the current task.md, sources.md and submission schema. For
15
15
  an inbound operation surface, combine this template with the selected gateway
16
16
  or protocol evidence without creating a second operation registry.
17
17
 
@@ -11,7 +11,7 @@ surface as `api-service`. A module that only calls a remote API is a protocol
11
11
  consumer, not automatically an API service. Gateways that translate to another
12
12
  protocol normally also selects `adapter-integration`.
13
13
 
14
- Use the exact profile and Artifact policy variant supplied by the workset. If
14
+ Follow the current task.md, sources.md and submission schema. If
15
15
  the reader goal is primarily the transformation between inbound and outbound
16
16
  boundaries, use the selected adapter-integration profile and retain one
17
17
  canonical operation registry.
@@ -10,7 +10,7 @@ Use for `background-runtime`: queue or stream consumers, scheduled jobs,
10
10
  pipelines, functions, controllers, watchers, and long-running agents activated
11
11
  by a trigger instead of an interactive request.
12
12
 
13
- Use the exact profile and Artifact policy variant supplied by the workset.
13
+ Follow the current task.md, sources.md and submission schema.
14
14
 
15
15
  ## Evidence pass
16
16
 
@@ -11,7 +11,7 @@ executables, generators, and command-driven plugin hosts. A build script used
11
11
  only internally does not need a CLI knowledge unit unless it is a supported
12
12
  operator or contributor surface.
13
13
 
14
- Use the exact profile and Artifact policy variant supplied by the workset.
14
+ Follow the current task.md, sources.md and submission schema.
15
15
 
16
16
  ## Evidence pass
17
17
 
@@ -12,7 +12,7 @@ imports and component contracts. A web application that happens to contain
12
12
  shared components remains a `web-application` unless the component surface is
13
13
  published as an independent consumer boundary.
14
14
 
15
- Use the exact profile and Artifact policy variant supplied by the workset.
15
+ Follow the current task.md, sources.md and submission schema.
16
16
 
17
17
  ## Evidence pass
18
18
 
@@ -30,10 +30,10 @@ Treat stories and examples as usage evidence, not as authority for unsupported
30
30
  props or behavior. When generated declarations disagree with source, identify
31
31
  the authoritative source and record the gap.
32
32
 
33
- When the Authorized Workset View supplies a public declaration together with
33
+ When the task's authorized sources supply a public declaration together with
34
34
  structured props, events, defaults, variants, maintained examples, or source
35
- roles, the corresponding reader section must consume those facts or record an
36
- explicit supported omission/material-gap disposition. Do not replace available
35
+ roles, use the relevant facts in the reader section and explain essential
36
+ missing material. Do not replace available
37
37
  contract facts with a generic statement about the component directory. A component group
38
38
  without a reader-authorizing public declaration remains catalog-only and does
39
39
  not produce an empty component page. Library and system subjects may instead be
@@ -11,7 +11,7 @@ IDL, OpenAPI document, schema registry, message contract, or equivalent
11
11
  machine-readable interface definition. It defines contracts consumed by other
12
12
  modules but does not need to execute or dispatch them itself.
13
13
 
14
- Use the exact profile and Artifact policy variant supplied by the workset.
14
+ Follow the current task.md, sources.md and submission schema.
15
15
  Generated projections must point back to this authority and remain supporting
16
16
  evidence rather than a second contract authority.
17
17
 
@@ -52,16 +52,14 @@ Examples include application-to-client-to-endpoint, endpoint-to-service-to-
52
52
  repository, producer-to-event-to-consumer, command-to-remote-operation, and
53
53
  plugin-host-to-provider.
54
54
 
55
- ## Partition and ownership rule
55
+ ## Article scope and source reuse
56
56
 
57
- A flow normally cites sources already owned by module units. Give the flow one
58
- stable article identity and keep module inventory ownership unchanged; its author
59
- workset may reference the exact cross-source evidence views but must not claim
60
- the same inventory members as a second primary owner.
57
+ A flow may reuse sources cited by module articles. Give the flow one stable
58
+ article identity and use the current task's authorized sources. No primary
59
+ owner or inventory membership is required; avoid duplicating existing prose.
61
60
 
62
- The aggregate candidate may cite evidence from every participating source. It
63
- must cover all Route-reported structural probes selected by the flow profile;
64
- one page may cover several probes when it carries each exact evidence locator.
61
+ The article may cite every authorized participating source. Cover the reader
62
+ question and relevant handoffs defined in the task brief.
65
63
  Explain operations and handoffs in reader prose, links or diagrams, citing the
66
64
  actual source regions for each fragment (at most three locations per fragment).
67
65
  Do not emit graph edges, classify nodes or create a relationship ledger.
@@ -11,7 +11,7 @@ reusable service contract and its first-level orchestration. Do not classify a
11
11
  directory as a service merely because it contains classes or functions named
12
12
  `Service`.
13
13
 
14
- Use the exact profile and Artifact policy variant supplied by the workset.
14
+ Follow the current task.md, sources.md and submission schema.
15
15
 
16
16
  ## Evidence pass
17
17
 
@@ -11,7 +11,7 @@ registration, ownership, dependency, build, or release topology of multiple
11
11
  child modules. Do not treat the physical repository as one application merely
12
12
  because it has one Git remote.
13
13
 
14
- Use the exact profile and Artifact policy variant supplied by the workset.
14
+ Follow the current task.md, sources.md and submission schema.
15
15
 
16
16
  ## Evidence pass
17
17
 
@@ -11,8 +11,7 @@ SDKs, public framework extensions, or shared runtimes consumed through a
11
11
  deliberately supported interface. A package being imported elsewhere is not
12
12
  enough; confirm its supported entry and consumer contract.
13
13
 
14
- Use the exact sdk-library or component-library profile and Artifact policy
15
- variant supplied by the workset.
14
+ Follow the current task.md, sources.md and submission schema.
16
15
 
17
16
  ## Evidence pass
18
17
 
@@ -15,7 +15,7 @@ only browser code. It does
15
15
  not automatically cover every package containing UI components; a reusable
16
16
  component package is usually `sdk-library`.
17
17
 
18
- Use the exact profile and Artifact policy variant supplied by the workset.
18
+ Follow the current task.md, sources.md and submission schema.
19
19
 
20
20
  ## Evidence pass
21
21
 
@@ -9,7 +9,10 @@ contracts, conditions, examples, compatibility limits, images and uncertainty.
9
9
  An inventory of headings, a generic summary or a link back to the source does
10
10
  not replace an article that answers the reader. Preserve exact commands,
11
11
  identifiers, numbers and destinations where they matter; do not reproduce
12
- secrets or incidental conversion metadata.
12
+ secrets or incidental conversion metadata. For an entry-first request, identify
13
+ the relevant source section and concrete next step; for an operational guide,
14
+ retain what lets the reader execute it. Do not replace available instructions
15
+ with a generic suggestion to consult the original document.
13
16
 
14
17
  Use [editorial guidance](editorial-policy.md) for a concrete presentation
15
18
  problem. It is advice for the Agent and user, not a signal-clearing protocol or
@@ -47,7 +50,9 @@ the same article; no primary/extension ownership is required.
47
50
 
48
51
  Correct misleading knowledge through a revision. Correct an inaccurate source
49
52
  through its authorized import flow, not by editing evidence from this skill.
50
- Keep useful prior contributions and real gaps visible during updates.
53
+ When merging or shortening existing articles, retain still-valid steps, examples
54
+ and constraints in the article or a linked topic, not just their source links.
55
+ Keep real gaps visible; material not yet obtained is not a permanent exclusion.
51
56
 
52
57
  ## Visual material
53
58
 
@@ -14,15 +14,18 @@ Document business definitions may correct a mechanical code-topic name; explain
14
14
  the proposed change in the plan instead of forcing the document into a path
15
15
  mirror. This does not authorize renaming formal files outside the current task.
16
16
 
17
- A coherent document can directly suggest one target. A long document may need
18
- several articles; several documents may jointly answer one question. Neither
19
- file count nor heading count determines article count. Choose batches based
20
- on reader tasks, dependencies and useful shared reading, not source or skill
21
- identity. Do not create per-member dispositions or a separate semantic graph.
17
+ A coherent document can directly suggest one target. Split distinct reader tasks
18
+ or lifecycles; combine sources when they answer the same task. A shared broad
19
+ label such as development or operations does not make all its procedures one
20
+ summary. Neither file nor heading count determines article count. Choose batches
21
+ by dependencies and useful shared reading, not source or skill identity. Do not
22
+ create per-member dispositions or a separate semantic graph.
22
23
 
23
24
  Submit article targets, questions, authorized sources and batches through the
24
25
  current planning schema. Keep remaining investigation in pending_scopes when
25
- only part is ready. An unread source is unfinished, not implicitly excluded.
26
+ only part is ready. Referencing one section does not settle a source's other
27
+ useful tasks; describe those in the existing plan. An unread source is unfinished,
28
+ not implicitly excluded.
26
29
  Missing essential evidence remains a scoped gap. Long-term exclusions need
27
30
  the applicable user authorization.
28
31