@c4a/context-cli 0.7.30 → 0.7.35

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 (88) hide show
  1. package/cli.js +2491 -645
  2. package/indexers/bundles/context-code-indexer/references/indexer.md +17 -0
  3. package/indexers/bundles/context-code-indexer/templates/articles/c01.md +1 -1
  4. package/indexers/bundles/context-code-indexer/templates/articles/c07.md +1 -1
  5. package/indexers/bundles/context-code-indexer/templates/articles/l02.md +1 -1
  6. package/indexers/bundles/context-markdown-indexer/references/indexer.md +17 -0
  7. package/indexers/bundles/context-markdown-indexer/templates/articles/c01.md +1 -1
  8. package/indexers/bundles/context-markdown-indexer/templates/articles/c07.md +1 -1
  9. package/indexers/bundles/context-markdown-indexer/templates/articles/l02.md +1 -1
  10. package/indexers/bundles/context-note-indexer/references/writing.md +17 -0
  11. package/indexers/bundles/context-note-indexer/templates/articles/c01.md +1 -1
  12. package/indexers/bundles/context-note-indexer/templates/articles/c07.md +1 -1
  13. package/indexers/bundles/context-note-indexer/templates/articles/l02.md +1 -1
  14. package/indexers/bundles/context-sessions-indexer/references/writing.md +17 -0
  15. package/indexers/bundles/context-sessions-indexer/templates/articles/c01.md +1 -1
  16. package/indexers/bundles/context-sessions-indexer/templates/articles/c07.md +1 -1
  17. package/indexers/bundles/context-sessions-indexer/templates/articles/l02.md +1 -1
  18. package/indexers/contracts/profile-contract.json +245 -245
  19. package/indexers/release-manifest.json +21 -21
  20. package/package.json +12 -12
  21. package/plugins/README.md +45 -2
  22. package/plugins/README_CN.md +33 -2
  23. package/plugins/VERSION +1 -1
  24. package/plugins/claude/.claude-plugin/plugin.json +3 -2
  25. package/plugins/claude/commands/context-inspect-search.md +18 -0
  26. package/plugins/claude/commands/context-plan.md +12 -0
  27. package/plugins/claude/commands/context.md +125 -9
  28. package/plugins/claude/skills/context-inspect-search/SKILL.md +18 -0
  29. package/plugins/claude/skills/context-plan/SKILL.md +110 -0
  30. package/plugins/claude/skills/context-plan/agents/openai.yaml +2 -0
  31. package/plugins/claude/skills/context-plan/references/project-planning.md +250 -0
  32. package/plugins/claude/skills/context-plan/references/resource-tools.md +100 -0
  33. package/plugins/claude/skills/context-plan/templates/PLAN.md +113 -0
  34. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  35. package/plugins/codex/skills/context/SKILL.md +125 -9
  36. package/plugins/codex/skills/context-inspect-search/SKILL.md +18 -0
  37. package/plugins/codex/skills/context-plan/SKILL.md +109 -0
  38. package/plugins/codex/skills/context-plan/agents/openai.yaml +2 -0
  39. package/plugins/codex/skills/context-plan/references/project-planning.md +250 -0
  40. package/plugins/codex/skills/context-plan/references/resource-tools.md +100 -0
  41. package/plugins/codex/skills/context-plan/templates/PLAN.md +113 -0
  42. package/plugins/cursor/.cursor-plugin/plugin.json +3 -2
  43. package/plugins/cursor/commands/c4a-context-inspect-search.md +18 -0
  44. package/plugins/cursor/commands/c4a-context-plan.md +9 -0
  45. package/plugins/cursor/commands/c4a-context.md +125 -9
  46. package/plugins/cursor/skills/context-inspect-search/SKILL.md +18 -0
  47. package/plugins/cursor/skills/context-plan/SKILL.md +110 -0
  48. package/plugins/cursor/skills/context-plan/agents/openai.yaml +2 -0
  49. package/plugins/cursor/skills/context-plan/references/project-planning.md +250 -0
  50. package/plugins/cursor/skills/context-plan/references/resource-tools.md +100 -0
  51. package/plugins/cursor/skills/context-plan/templates/PLAN.md +113 -0
  52. package/plugins/skills/context/SKILL.md +125 -9
  53. package/plugins/skills/context-code-indexer/references/indexer.md +17 -0
  54. package/plugins/skills/context-code-indexer/templates/articles/c01.md +1 -1
  55. package/plugins/skills/context-code-indexer/templates/articles/c07.md +1 -1
  56. package/plugins/skills/context-code-indexer/templates/articles/l02.md +1 -1
  57. package/plugins/skills/context-inspect-search/SKILL.md +18 -0
  58. package/plugins/skills/context-markdown-indexer/references/indexer.md +17 -0
  59. package/plugins/skills/context-markdown-indexer/templates/articles/c01.md +1 -1
  60. package/plugins/skills/context-markdown-indexer/templates/articles/c07.md +1 -1
  61. package/plugins/skills/context-markdown-indexer/templates/articles/l02.md +1 -1
  62. package/plugins/skills/context-note-indexer/references/writing.md +17 -0
  63. package/plugins/skills/context-note-indexer/templates/articles/c01.md +1 -1
  64. package/plugins/skills/context-note-indexer/templates/articles/c07.md +1 -1
  65. package/plugins/skills/context-note-indexer/templates/articles/l02.md +1 -1
  66. package/plugins/skills/context-plan/SKILL.md +109 -0
  67. package/plugins/skills/context-plan/agents/openai.yaml +2 -0
  68. package/plugins/skills/context-plan/references/project-planning.md +250 -0
  69. package/plugins/skills/context-plan/references/resource-tools.md +100 -0
  70. package/plugins/skills/context-plan/templates/PLAN.md +113 -0
  71. package/plugins/skills/context-sessions-indexer/references/writing.md +17 -0
  72. package/plugins/skills/context-sessions-indexer/templates/articles/c01.md +1 -1
  73. package/plugins/skills/context-sessions-indexer/templates/articles/c07.md +1 -1
  74. package/plugins/skills/context-sessions-indexer/templates/articles/l02.md +1 -1
  75. package/providers/context/actions/repair-project-entry.yaml +1 -0
  76. package/providers/context/graphs/workspace.yaml +1 -1
  77. package/providers/context/manifest.json +27 -23
  78. package/providers/context/provider.yaml +1 -1
  79. package/providers/context/resources/manuals/guides/knowledge-updates.md +6 -0
  80. package/providers/context/resources/manuals/guides/lark-resources.md +94 -11
  81. package/providers/context/resources/manuals/guides/source-batches.md +89 -0
  82. package/providers/context/resources/manuals/guides/workspace-prepare.md +12 -0
  83. package/providers/context/resources/manuals/reference/project-api.md +4 -0
  84. package/providers/context/resources/procedures/document-capture.md +31 -11
  85. package/providers/context/resources/procedures/knowledge-review.md +13 -0
  86. package/providers/context/resources/procedures/knowledge-updates.md +6 -0
  87. package/providers/context/resources/procedures/source-capture-detailed.md +40 -8
  88. package/providers/context/resources/procedures/workspace-prepare.md +12 -0
@@ -0,0 +1,250 @@
1
+ # Project research and staged delivery
2
+
3
+ ## Project boundary and research materials
4
+
5
+ Work in the knowledge project selected by the user. Find its Git root and reuse
6
+ the existing workspace; a matching PLAN may be outside a nested Context working
7
+ directory. If the target project is not established, resolve that choice before
8
+ writing its plan. Do not create another repository merely to hold research.
9
+
10
+ Use this local layout when new scratch material is needed:
11
+
12
+ ```text
13
+ <project-git-root>/
14
+ PLAN-YYYYMMDD-slug.md
15
+ .tmp/context-plans/YYYYMMDD-slug/
16
+ repos/
17
+ documents/
18
+ research/
19
+ stage-inputs/
20
+ ```
21
+
22
+ Reuse authorized local checkouts in their existing locations first. For a source
23
+ requiring a new checkout, place it in `repos/`. Keep retrieved document bodies
24
+ and resources in `documents/`, inventory and investigation notes in `research/`,
25
+ and the current production handoff in `stage-inputs/`. These paths are conventions;
26
+ no file names or directory layout become a new command gate. Keep scratch data
27
+ out of Git and never force-add ignored files. The committed PLAN must retain
28
+ source identities and enough context to resume if local scratch files disappear.
29
+
30
+ Begin with directory metadata, source type, available versions and existing
31
+ knowledge coverage. Read representative bodies and relevant code entrypoints
32
+ to estimate scope and dependencies. Expand only where needed to identify useful
33
+ stages; a project inventory need not download every body before planning.
34
+ Save listing progress and failed branches, deduplicate sources by their actual
35
+ identity, and retry affected subsets using supported tools. Reading a directory
36
+ does not establish that its contents or outgoing links have been read.
37
+
38
+ Maintain the selected identity for each source and its embedded resources.
39
+ Record inaccessible items and their effect on the proposed scope. Do not prompt
40
+ for user authorization or switch a resource to a different identity simply
41
+ because one attachment failed. Reuse permitted representations when available;
42
+ otherwise record the reference and unavailable status. A document-wide identity
43
+ change requires the applicable source policy and authorization, not an implicit
44
+ per-resource fallback.
45
+
46
+ ## Review existing knowledge and connect the material
47
+
48
+ Before proposing article targets or dividing production stages, inspect the
49
+ selected knowledge workspace's current organization, relevant approved articles,
50
+ registered sources and available source references. Reuse the workspace's
51
+ supported read-only views or search the authorized approved knowledge, then read
52
+ the relevant sections in context. Titles, directory placement and search snippets
53
+ alone do not establish either duplication or a coverage gap.
54
+
55
+ Compare the incoming material with that existing knowledge by reader task and
56
+ behavior, not only by names. Look for the same subject under different terms,
57
+ complementary explanations, changed behavior, conflicts, shared prerequisites
58
+ and relationships between code and documents. Follow relevant article links and
59
+ source references to understand those connections within the authorized scope;
60
+ an unread citation is not evidence, and a link does not authorize expanding into
61
+ an unrelated source. Keep approved pages, pending drafts, older package output
62
+ and previous PLAN deliveries distinct; a draft is pending work, not an approved
63
+ answer or a reason to produce the same page again.
64
+
65
+ Record a compact coverage-and-relationship map in the PLAN, grouping related
66
+ sources where useful. For each proposed topic, identify the existing page or
67
+ section, the new material, the actual overlap or gap, useful connections and
68
+ the proposed disposition:
69
+
70
+ - **Reuse unchanged:** existing knowledge already covers the reader task;
71
+ link to it and avoid another article or unnecessary rewriting.
72
+ - **Revise or extend:** update the relevant existing article while retaining
73
+ its identity and still-correct coverage.
74
+ - **Consolidate:** propose where overlapping material belongs and which
75
+ article will carry it; any move, merge or retirement follows the existing
76
+ production, review and authorization rules later.
77
+ - **Add:** create a new article only for a distinct reader need or confirmed
78
+ gap, and suggest its place within the existing organization.
79
+ - **Investigate:** record an unresolved conflict, unread material or missing
80
+ access without treating it as proof that no knowledge exists.
81
+
82
+ Use these findings to choose stage dependencies and handoffs. Shared concepts
83
+ and supporting sources can serve several stages; this does not require copying
84
+ the same explanation into every article or creating one article per source.
85
+ Research remains read-only for managed workspace content: do not merge, delete
86
+ or rewrite knowledge while preparing the PLAN. For a genuinely empty workspace,
87
+ record that no existing coverage was found and plan initial coverage; for an
88
+ unavailable workspace, record the limit and keep deduplication conclusions
89
+ provisional instead of silently treating it as empty.
90
+
91
+ ## Resolve versions and organize stages
92
+
93
+ For each repository selected for substantive research, resolve a requested
94
+ `latest` or branch to an actual commit before using it as evidence. Record that
95
+ ref in the PLAN and production handoff. A later update is a deliberate version
96
+ comparison; do not silently move the source baseline while writing a stage.
97
+ For document updates, retain available source revision or capture time and any
98
+ limits on historical comparisons. These research records do not belong in
99
+ reader-facing article prose unless a version difference explains behavior.
100
+
101
+ Group by reader task, related subject and delivery dependencies, considering
102
+ existing approved articles before proposing new ones. Source count is not
103
+ article count. Separate discovery-only records from the source set selected for
104
+ the next production stage. Plan these bounds:
105
+
106
+ | Stage kind | Default scope |
107
+ | --- | --- |
108
+ | Document research and writing | At most 20 source documents. Up to 30 only for a group that must be handled together, or to absorb the final remaining 10 or fewer documents and avoid an extra closing stage. Record the concrete exception in the PLAN. |
109
+ | New repository investigation | One repository, with selected modules and research objectives. Split additional repositories into later stages. |
110
+ | Revision of existing knowledge | At most 30 target articles, while respecting the stage's source limits. |
111
+
112
+ Do not increase a stage merely because the Agent considers it manageable or
113
+ wants fewer rounds. A together-only exception needs a concrete dependency that
114
+ makes separate handling unsuitable; related topics alone are insufficient.
115
+ The tail exception applies only at the end, with no more than 10 documents left
116
+ after a normal 20-document stage. For example, 50 independent documents become
117
+ 20 + 30, while 35 become 20 + 15, not 30 + 5. Neither exception relaxes repository,
118
+ revision-target or dependency boundaries.
119
+
120
+ Previously studied repositories can support a document stage without becoming
121
+ new full-repository investigations. If a supposed supporting repository needs
122
+ substantial new exploration, schedule that research explicitly. Include shared
123
+ dependencies and reusable evidence so subsequent stages do not repeat the same
124
+ investigation. Order stages to make the first useful delivery possible early.
125
+
126
+ Identify the configured destinations and inherited review, managed execution
127
+ and publication settings. Do not preassign package release versions to future
128
+ stages; resolve the appropriate version through the normal publishing process
129
+ when that stage is ready.
130
+
131
+ ## Compare updates across sources
132
+
133
+ For each source, locate its existing registered ref or captured snapshot and
134
+ the approved articles that actually reference it. Resolve the user's requested
135
+ version, or the intended branch's `latest`, to an explicit target ref. Record
136
+ each source's own baseline/target pair; do not transfer one repository's version
137
+ label to another source or assume every article uses the same baseline.
138
+
139
+ For repositories, examine the relevant Git change range and its relationship
140
+ to the articles' actual cited paths, symbols and reader-facing behavior. A
141
+ changed file is a candidate for investigation, not proof that an article needs
142
+ rewriting. Keep unrelated changes and still-correct knowledge out of the
143
+ revision scope. Explain additions or removals through the behavior and coverage
144
+ they affect, including cross-repository dependencies when material.
145
+
146
+ For documents, classify the findings as new, changed, deleted or invalidated,
147
+ unchanged, or currently unreadable. A permission failure is an access gap, not
148
+ evidence of deletion. Use available revisions and saved bodies for comparison;
149
+ without an old snapshot, explain the observable current state and do not claim
150
+ a line-by-line historical diff. Treat unsupported resource representations as
151
+ coverage limits rather than silently considering the document fully read.
152
+
153
+ Summarize the proposed article changes, unchanged coverage and uncertain cases
154
+ in the PLAN. If the user asked only to inspect changes or provide a comparison,
155
+ stop at that report. Agreement with the findings alone does not authorize
156
+ production: obtain explicit authorization to execute the staged update, complete PLAN review
157
+ under its effective policy, then hand
158
+ only the selected stage to the existing Context workflow.
159
+
160
+ ## Approve the project report
161
+
162
+ Present a readable PLAN with the proposed outcome, source boundaries, coverage
163
+ gaps, stages and delivery expectations. Apply `context.gate.plan_review` and the
164
+ Skill's authorized task-scoped override. The default is `ask`: invite the user
165
+ to read and approve it; no special approval string, generated code or schema is
166
+ required. In delegated mode the Agent must read and review that same report,
167
+ resolve deficiencies and record its decision before production. Research
168
+ permission alone does not authorize executing the plan. Neither automatic
169
+ triggering nor managed mode alone delegates this first review.
170
+
171
+ Establish the reporting mode using existing instructions where possible:
172
+
173
+ - **After all stages:** continue authorized work and summarize at the end;
174
+ report actual blockers requiring user action when they arise.
175
+ - **After each stage:** send a stage summary and follow the explicitly selected
176
+ continuation policy, either continue automatically or wait for a reply.
177
+
178
+ Reporting frequency does not change the existing Context article review mode.
179
+ An ordinary review still needs its normal user decision, and managed review
180
+ still requires its existing authority and complete reading. If the user requests
181
+ publication-free work, record the narrower deliverable explicitly; label it
182
+ reviewed or locally built as appropriate, never published. Do not enable a
183
+ remote publishing destination just to satisfy a planning checklist.
184
+
185
+ After approval, commit the report and attempt integration using the user's
186
+ authorized branch and repository process. Respect required checks and protected
187
+ branches. If direct integration is unavailable, create a PR/MR when authorized
188
+ and report its link. Keep the plan's actual merge state; an open review request
189
+ does not cancel authorized research or unrelated stages. Without Git mutation
190
+ authorization, retain the local report and continue work already authorized.
191
+
192
+ ## Hand one stage to production
193
+
194
+ Provide the installed `context` Skill with:
195
+
196
+ - the approved PLAN path and selected stage ID;
197
+ - that stage's user outcome and specific source set;
198
+ - fixed repository refs, reusable research and unresolved evidence gaps;
199
+ - target existing articles and warranted new topics;
200
+ - relevant existing sections, the planned reuse/revision/consolidation decisions,
201
+ and source or article relationships that this stage must preserve;
202
+ - dependencies and the inherited review, managed and publishing settings;
203
+ - its reporting and continuation policy;
204
+ - the effective PLAN/article review policies and the trusted authorization for
205
+ any task-scoped overrides, without modifying the Bot or workspace defaults.
206
+
207
+ The handoff states that this is one stage of an approved project plan. The
208
+ production Skill follows its fresh Route for that scope, without applying the
209
+ large-project threshold again to the full PLAN. Do not register the complete
210
+ discovery inventory or turn every discovered item into a capture phase. Reuse
211
+ available supported stage scoping/configuration; do not hand-edit protected
212
+ registries, clear another task, or invent an unavailable CLI switch to restrict
213
+ the scope. If the current workspace cannot isolate the selected stage, preserve
214
+ its active work and report the concrete configuration issue before production.
215
+
216
+ Stage planning does not replace production's semantic planning, source checks,
217
+ candidate review or publication. Pass a bounded task into that existing process
218
+ and consume its actual receipts when it finishes.
219
+
220
+ Before starting each later stage, recheck only the affected knowledge and pending
221
+ work against the current workspace, including articles delivered by earlier
222
+ stages or other contributors. Refresh the overlap decisions and next-stage
223
+ targets in the PLAN rather than repeating the full investigation. Preserve
224
+ unrelated changes; follow the existing approval rules for any material change
225
+ to the agreed project scope.
226
+
227
+ ## Progress, interruption and completion
228
+
229
+ Update the PLAN after a meaningful checkpoint or stage transition, distinguishing
230
+ discovered, registered, captured, written, reviewed, built and published work.
231
+ Record the active command/job, current source or page, persistent input location,
232
+ last confirmed result, remaining work and next action. Never infer success from
233
+ an absent process or from the task runner's overall completion status.
234
+
235
+ For a completed production stage, record the actual delivered pages, publication
236
+ destination and receipt, resolved version, and associated commits/PRs/MRs. Check
237
+ its delivery box only when the agreed delivery is confirmed. Keep merge and
238
+ publication status separate; work may be awaiting one while the other succeeded.
239
+ Commit and synchronize confirmed progress under the existing Git authorization.
240
+
241
+ If interrupted, keep the PLAN and resume the current stage instead of repeating
242
+ project-wide research. Check current workspace state and reuse confirmed outputs.
243
+ An unresolved review, merge or publication remains visible. Continue independent
244
+ stages only when their prerequisites and existing authorization permit it.
245
+
246
+ Once all agreed stages have been delivered and outstanding integration is
247
+ resolved, summarize the result, remove the PLAN, and include that deletion in the
248
+ authorized final commit and synchronization. Do not delete before the completion
249
+ criteria are met or erase its Git history. If final integration is pending,
250
+ retain the PLAN with the outstanding action so another session can finish it.
@@ -0,0 +1,100 @@
1
+ # Tools for planning research
2
+
3
+ Use tools and credentials already available in the selected environment. Inspect
4
+ their advertised commands and help before invoking an unfamiliar operation;
5
+ capabilities can vary by installation. A missing command is a capability gap,
6
+ not permission to invent an endpoint or bypass the source's access controls.
7
+
8
+ ## Source inventory and selective capture
9
+
10
+ Prefer supported directory listing, batch capture, persistent progress and
11
+ resume capabilities. Store reusable output in the plan's scratch directory.
12
+ Keep listing results distinct from captured bodies and capture failures distinct
13
+ from denied resources. Source type determines the appropriate document, table,
14
+ board or file adapter; do not force every source through a document-only API.
15
+
16
+ Where the installed tool supports bounded concurrency and rate-limit handling,
17
+ let it schedule independent reads and honor its retry/backoff results. Avoid
18
+ agent-written parallel shell loops that bypass those controls or concurrently
19
+ write shared Context state. If only narrower operations are available, use
20
+ bounded batches, persist their receipts, and report the capability limitation.
21
+
22
+ Continue using the existing Context entry and its returned commands for official
23
+ registration, capture and knowledge production. Planning scratch downloads are
24
+ research inputs, not a substitute for an accepted source snapshot. Do not put
25
+ research files directly into `sources/` or `knowledge/`.
26
+
27
+ ## Capture once and reuse in a production stage
28
+
29
+ For an authorized Lark document, download a complete local snapshot before a
30
+ Context workspace exists:
31
+
32
+ ```bash
33
+ context source fetch lark https://example.larkoffice.com/docx/example-token \
34
+ --output .tmp/context-plans/20260101-handbook/documents/handbook \
35
+ --as bot --format json
36
+ ```
37
+
38
+ The destination must be new. This operation does not register a source, create
39
+ a production task, or write managed workspace state. It uses one fixed identity
40
+ (Bot by default), including embedded resources; it never switches to User on
41
+ failure. Use `--as user` only when authorized to read with that identity. Existing
42
+ host authorization may then require consent. Inspect the fidelity and resource
43
+ diagnostics: a retained reference or preview is not the complete missing resource.
44
+ Rate-limit handling and supported same-identity representations use the ordinary
45
+ capture machinery.
46
+
47
+ Keep the whole returned `snapshot_dir`, including `snapshot.json`, document,
48
+ raw responses and assets. The receipt is local integrity and capture provenance,
49
+ not a platform signature or proof that the upstream document is still current.
50
+ Do not replace a response with a summary or edit the receipt to hide gaps.
51
+
52
+ After plan approval, register only the selected stage's source through the
53
+ existing workflow. Then use the matching registered name in an import file:
54
+
55
+ ```json
56
+ {
57
+ "type": "lark",
58
+ "name": "20260101/handbook",
59
+ "snapshot_dir": ".tmp/context-plans/20260101-handbook/documents/handbook"
60
+ }
61
+ ```
62
+
63
+ ```bash
64
+ context source import --input .tmp/context-plans/20260101-handbook/stage-inputs/import.json --format json
65
+ ```
66
+
67
+ Paths in the payload are relative to the selected Context workspace; use its
68
+ actual registered source name and an allowed local location. When moving between
69
+ workspaces, copy or move the complete snapshot to the selected workspace's
70
+ scratch directory. Snapshot entries must be real files, not symbolic links.
71
+ Import validates the source identity, saved responses, digests and resource
72
+ files through the normal capture write path. It preserves the original capture
73
+ time and revision and makes no remote calls, including for structured resources.
74
+ If the stage has a different resource policy, use its normal capture operation
75
+ or explicitly reconcile that configuration; do not edit the saved receipt to
76
+ pretend it was captured under a different policy.
77
+ If the stage needs a newer source revision, fetch a new snapshot to a new directory
78
+ instead of describing the saved one as fresh. Existing `response_files` import
79
+ remains available, but may still fetch resources absent from those responses;
80
+ use an intact `snapshot_dir` for complete local reuse.
81
+
82
+ `context source discover lark` provides resumable Wiki directory discovery in an
83
+ existing Context workspace. It does not fetch bodies or register the inventory.
84
+ When no workspace exists, use the available source platform's authorized listing
85
+ capability; do not invent a workspace-free discovery flag or initialize a full
86
+ production scope only to list a directory. Batch registration and its checkpoints
87
+ belong to the selected production stage, not the full planning inventory.
88
+
89
+ ## Repository research
90
+
91
+ Reuse an existing authorized checkout at the requested revision. Read metadata
92
+ and selected paths before deciding whether more objects or files are needed.
93
+ For a new checkout, use the source platform's supported clone/read capabilities
94
+ and save the resolved commit in the PLAN. Keep remote read results tied to that
95
+ same commit, and fetch additional content only when the research requires it.
96
+
97
+ Respect uncommitted work in reused checkouts. Do not reset, replace, rebase or
98
+ switch a user's active worktree just to change the planning baseline. Use an
99
+ available read-only view or an authorized separate research checkout when the
100
+ required revision is unavailable locally.
@@ -0,0 +1,113 @@
1
+ # Project plan: <project name>
2
+
3
+ This report records the agreed project scope and stage progress. Complete the
4
+ relevant sections in ordinary Markdown; remove template guidance when filling
5
+ it in. It is a working report, not a machine-validated schema.
6
+
7
+ ## Outcome and current position
8
+
9
+ - Reader/audience and requested outcome:
10
+ - Knowledge workspace and Git root:
11
+ - Current project state and active stage:
12
+ - Last confirmed result:
13
+ - Next action:
14
+
15
+ ## Research scope and findings
16
+
17
+ | Source or subject | Kind and identity | Resolved version / capture context | Scale and coverage | Access or evidence gaps |
18
+ | --- | --- | --- | --- | --- |
19
+ | | | | | |
20
+
21
+ - For updates: each source's recorded baseline, target version and relevant changes:
22
+ - Representative material examined and findings affecting the plan:
23
+ - Additional sources/links discovered, excluded scope and unresolved coverage:
24
+ - Scratch research location and reusable checkpoints:
25
+
26
+ ## Existing knowledge and material relationships
27
+
28
+ - Workspace organization and relevant approved sections actually inspected:
29
+ - Existing source references and connections followed:
30
+ - Pending drafts, earlier stage deliveries or concurrent work to account for:
31
+ - Inspection coverage and any unavailable knowledge; do not treat unread as absent:
32
+
33
+ | Topic / reader task | Existing article and section | Incoming documents / repositories | Overlap, gap or conflict | Proposed disposition and reason | Related knowledge / source dependencies |
34
+ | --- | --- | --- | --- | --- | --- |
35
+ | | | | | Reuse / revise / consolidate / add / investigate | |
36
+
37
+ Group related material where useful; this is not a one-row-per-source inventory.
38
+ Support decisions with sections actually read. For new coverage, suggest an
39
+ existing section or explain the needed addition. Consolidation here is a proposal,
40
+ not permission to modify or retire approved articles during research.
41
+
42
+ ## Proposed stages
43
+
44
+ Use stable stage names. For a stage requiring publication, a delivery checkbox
45
+ stays empty while only registration, capture, writing, review or a local build
46
+ has completed. An explicitly publication-free stage may be marked delivered
47
+ when its agreed deliverable is complete; do not label it published.
48
+
49
+ | Delivered | Stage | Reader outcome and article targets | Selected sources and fixed refs | Scope counts and reason for any exception | Prerequisites | Current state |
50
+ | --- | --- | --- | --- | --- | --- | --- |
51
+ | [ ] | S01 | | | | | planned |
52
+
53
+ Explain how source groups map to useful articles rather than assuming one source
54
+ requires one article. Record document, newly investigated repository and revision
55
+ target counts for each relevant stage.
56
+
57
+ Limit each stage to 20 source documents. If a stage contains 21–30, record either
58
+ why those documents must be handled together, or that it absorbs the final
59
+ remaining 10 or fewer documents to avoid an extra closing stage. General
60
+ manageability is not an exception; neither case permits more than 30.
61
+
62
+ ## Approval and execution choices
63
+
64
+ - First report presented to the user:
65
+ - Effective PLAN review policy (`ask` / `delegate`) and task-scoped override authority:
66
+ - Human approval or Agent review result, deficiencies resolved and scope adjustments:
67
+ - Execution authorization (separate from permission to research/review):
68
+ - Reporting: after all stages / after each stage:
69
+ - If reporting by stage: continue automatically / wait for a reply:
70
+ - Existing article review and managed execution settings:
71
+ - Agreed delivery destination and inherited publishing settings:
72
+ - Authorized Git branch, commit and PR/MR/integration process:
73
+ - Decisions still needed:
74
+
75
+ Do not assign release versions in advance. A project plan approval does not
76
+ stand in for article review, publishing permission or source authorization.
77
+
78
+ ## Current stage handoff
79
+
80
+ - Approved plan and selected stage ID:
81
+ - Bounded task passed to the existing Context Skill:
82
+ - Selected sources, pinned refs and relevant research:
83
+ - Existing article targets / new topics:
84
+ - Reuse, revision or consolidation decisions and relationships to preserve:
85
+ - Affected knowledge rechecked before this stage, including prior stage deliveries:
86
+ - Effective task-scoped review overrides and their trusted authorization:
87
+ - Inherited publishing and reporting choices:
88
+ - Evidence gaps or dependencies that affect this stage:
89
+
90
+ Project planning is already complete for this handoff. Production uses only this
91
+ stage's scope and its normal Route; the full inventory is not a new task input.
92
+
93
+ ## Results and synchronization
94
+
95
+ | Stage | Confirmed production/review result | Actual delivery and receipt/version | Commit / PR / MR | Merge state | Remaining action |
96
+ | --- | --- | --- | --- | --- | --- |
97
+ | | | | | | |
98
+
99
+ ## Resume notes
100
+
101
+ - Active job/command and current processing position:
102
+ - Persistent input/checkpoint and confirmed completed work:
103
+ - Outstanding review, integration or publication:
104
+ - Next executable action within the approved scope:
105
+ - Independent work that can continue:
106
+
107
+ A saved policy is a recovery record, not authorization by itself. On a resumed
108
+ session, validate delegation against trusted task instructions; otherwise retain
109
+ the default review policy until authorization is available.
110
+
111
+ Keep this report while any agreed delivery or integration remains pending.
112
+ After actual completion, remove it in the authorized final commit and synchronize
113
+ that commit; Git history preserves the approved plan and progress.
@@ -61,3 +61,20 @@ answer the selected question without reconstructing the conversation? Check
61
61
  that the article answers its planned reader question. Keep remaining investigation
62
62
  and real gaps visible in the stage; do not submit a per-passage disposition ledger. A generic overview that drops the actual decision,
63
63
  exception or resolution is incomplete even if its headings look correct.
64
+
65
+ ## Source provenance and article prose
66
+
67
+ Keep capture baselines, repository commit hashes, inspected branch revisions and
68
+ verification timestamps in structured source references or citation destinations,
69
+ not in article headings, introductions, tables or standalone evidence paragraphs.
70
+ Do not add sentences such as “the backend baseline is repository@commit” merely
71
+ to describe how the article was researched. Preserve exact source links and
72
+ reference metadata; removing this prose must not weaken traceability.
73
+
74
+ Retain business or API versions, compatibility constraints, migration differences
75
+ and performance comparison baselines when they explain behavior or reader actions.
76
+ A commit belongs in the prose only when the requested topic is that specific
77
+ change, regression or reproduction and its identity is necessary. Apply editorial
78
+ cleanup only to the current authorized writing or revision scope; do not scan or
79
+ rewrite unrelated approved articles. This is writing guidance, not a keyword-based
80
+ CLI rejection rule.
@@ -28,7 +28,7 @@ This is a writing blueprint, not a completion gate. Adapt the headings and level
28
28
  3. **技术与依赖摘要**:仅在有技术材料且影响读者选择入口时出现;纯产品资料不强制此节。
29
29
  4. **知识索引**:主题、何时阅读、目标文章/代码位置。
30
30
  5. **任务导航**:开发、接口对接、排障、交付分别从哪里继续。
31
- 6. **来源与适用版本**:文档身份/定位与适用版本;代码材料记录仓库、模块路径和证据版本。
31
+ 6. **来源与适用版本**:文档身份、代码仓库和模块入口;正文仅说明影响使用的业务或兼容版本,取证提交号保留在来源引用元数据中。
32
32
 
33
33
  最低产出:对象身份、可信资料/起始文件/注册点和下一步阅读位置。浅索引模块可作为父级表格中的记录,不强制单页。禁止链接到尚未产出的模板占位文件。
34
34
 
@@ -20,7 +20,7 @@ This is a writing blueprint, not a completion gate. Adapt the headings and level
20
20
 
21
21
  适用:入口优先的业务知识包,尤其是只持有 dist 的消费 Agent。建议章节为 **问题到入口的映射 → 源码身份与版本 → 推荐阅读顺序 → 外部边界 → 何时需要进一步证据**。
22
22
 
23
- 定位记录:仓库身份、仓内路径/符号、证据版本、已证明到哪一层、接着读什么。在包内返回可执行的阅读指引;工作区 inspect 与包外源码归因遵循各自现有能力和授权,不声称普通 dist query 会自动 clone。无需在每篇文章重复整套工作流,只保留本篇起点和相关指引链接。
23
+ 定位记录:仓库身份、仓内路径/符号、已证明到哪一层、接着读什么。取证版本保留在来源引用元数据中,不在正文重复仓库提交基线。在包内返回可执行的阅读指引;工作区 inspect 与包外源码归因遵循各自现有能力和授权,不声称普通 dist query 会自动 clone。无需在每篇文章重复整套工作流,只保留本篇起点和相关指引链接。
24
24
 
25
25
  ## 图示选择
26
26
 
@@ -56,7 +56,7 @@ Toast 类家族可以先给成员选择表,再按成员或调用方式分节
56
56
  | 行为与组合规则 | 状态谁控制、如何交互、配置如何叠加 | 受控/非受控、回调、数据结构、覆盖顺序、关闭/清理、组合约束;具体内容由组件能力决定 |
57
57
  | 样式与设计系统 | 哪些是组件可覆盖项、哪些来自全局系统 | 变体、尺寸、slot、token、逻辑方向等具体差异;公共基础规范链接到设计系统,不整篇复制 |
58
58
  | 运行环境、可访问性与限制 | 在什么条件下可用、有什么已知边界 | SSR/Portal/宿主/移动端限制;已证实键盘、焦点、role、对比度相关行为;实际测试与静态观察区分 |
59
- | 相关组件与源码入口 | 继续查哪里、换用谁、哪份证据支持本页 | 相关能力、实现/类型/示例/文档定位,明确证据版本;关键行为的定位尽量贴近对应章节 |
59
+ | 相关组件与源码入口 | 继续查哪里、换用谁、哪份证据支持本页 | 相关能力、实现/类型/示例/文档定位,取证版本保留在引用元数据中;关键行为的定位尽量贴近对应章节 |
60
60
 
61
61
  章节可以有组件特定的小节,例如“选择后是否关闭”“清理时机”“嵌套分组”。固定公共章节不要求把每个组件的业务特点改成相同文案,也不改变事实的原有语义。
62
62
 
@@ -5,6 +5,7 @@ effect: write
5
5
  handler: context.project.repair-entry
6
6
  # Supporting SDK manuals remain available through links, without mandatory reads.
7
7
  files:
8
+ - resources/manuals/guides/source-batches.md
8
9
  - resources/manuals/reference/code-extractors.md
9
10
  - resources/manuals/guides/knowledge-updates.md
10
11
  - resources/manuals/guides/note.md
@@ -153,7 +153,7 @@ nodes:
153
153
  resolutionAction: actions/resume-workspace-task.yaml
154
154
  gate:
155
155
  id: resume-workspace-task
156
- prompt: Task state was cleared; retained knowledge does not prove all registered scope was delivered. Stay ready unless the user asks to resume production. With that explicit request, run task resume and follow the fresh Route.
156
+ prompt: Task state was cleared; retained knowledge does not prove all registered scope was delivered. For a capture-only request, register the named documents and reevaluate the capture Route without resuming production; report their outcomes and stop. Stay ready unless the user asks to resume production. With that explicit request, run task resume and follow the fresh Route.
157
157
  delegatable: false
158
158
  satisfiedBy:
159
159
  - path: workspace.task_start_authorized