@c4a/context-cli 0.6.1 → 0.6.2
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/README.md +48 -10
- package/README.zh-CN.md +176 -0
- package/cli.js +60700 -35477
- package/docs/quickstart.md +23 -5
- package/package.json +4 -2
- package/plugins/README.md +60 -118
- package/plugins/README_CN.md +51 -102
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/continue.md +56 -10
- package/plugins/claude/commands/init.md +24 -11
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/SKILL.md +56 -11
- package/plugins/codex/skills/init/SKILL.md +23 -11
- package/plugins/cursor/.cursor-plugin/plugin.json +2 -3
- package/plugins/cursor/README.md +2 -2
- package/plugins/cursor/commands/context-continue.md +56 -10
- package/plugins/cursor/commands/context-init.md +24 -11
- package/plugins/skills/context-continue/SKILL.md +56 -11
- package/plugins/skills/context-init/SKILL.md +23 -11
- package/providers/context/actions/accept-package-templates.yaml +5 -0
- package/providers/context/actions/align-next.yaml +6 -0
- package/providers/context/actions/apply-managed-review.yaml +5 -0
- package/providers/context/actions/apply-structure-confirmation.yaml +5 -0
- package/providers/context/actions/build-next.yaml +5 -0
- package/providers/context/actions/capture-next.yaml +5 -0
- package/providers/context/actions/close-approved-knowledge.yaml +5 -0
- package/providers/context/actions/compile-next.yaml +5 -0
- package/providers/context/actions/configure-code-extraction.yaml +5 -0
- package/providers/context/actions/configure-document-capture.yaml +5 -0
- package/providers/context/actions/configure-package-output.yaml +5 -0
- package/providers/context/actions/configure-prose-lifecycle.yaml +5 -0
- package/providers/context/actions/ensure-repository-sources.yaml +5 -0
- package/providers/context/actions/extract-next.yaml +5 -0
- package/providers/context/actions/inspect-document-classification.yaml +5 -0
- package/providers/context/actions/inspect-review.yaml +5 -0
- package/providers/context/actions/inspect-structure.yaml +5 -0
- package/providers/context/actions/maintain-evidence.yaml +6 -0
- package/providers/context/actions/materialize-context-view.yaml +8 -0
- package/providers/context/actions/register-source-batch.yaml +7 -0
- package/providers/context/actions/repair-project-entry.yaml +5 -0
- package/providers/context/actions/repair-verification.yaml +5 -0
- package/providers/context/actions/repair-workspace-state.yaml +5 -0
- package/providers/context/codes.yaml +40 -0
- package/providers/context/graphs/workspace.yaml +494 -0
- package/providers/context/manifest.json +637 -0
- package/providers/context/provider.yaml +12 -0
- package/providers/context/resources/diagnostics/projection-stale.md +13 -0
- package/providers/context/resources/diagnostics/verification.md +21 -0
- package/providers/context/resources/diagnostics/workspace-state.md +27 -0
- package/providers/context/resources/dialogue/code-extraction.md +34 -0
- package/providers/context/resources/dialogue/document-capture.md +29 -0
- package/providers/context/resources/dialogue/document-classification.md +33 -0
- package/providers/context/resources/dialogue/evidence-maintenance.md +26 -0
- package/providers/context/resources/dialogue/human-gates.md +34 -0
- package/providers/context/resources/dialogue/knowledge-review.md +27 -0
- package/providers/context/resources/dialogue/package-output.md +30 -0
- package/providers/context/resources/dialogue/source-boundary.md +29 -0
- package/providers/context/resources/dialogue/structure-confirmation.md +44 -0
- package/providers/context/resources/manuals/guides/package-outputs.md +259 -0
- package/providers/context/resources/manuals/reference/package-templates.md +378 -0
- package/providers/context/resources/manuals/reference/project-api.md +789 -0
- package/providers/context/resources/manuals/reference/template-variables.md +248 -0
- package/providers/context/resources/procedures/close-and-build.md +21 -0
- package/providers/context/resources/procedures/code-extraction.md +50 -0
- package/providers/context/resources/procedures/document-capture.md +45 -0
- package/providers/context/resources/procedures/document-classification.md +22 -0
- package/providers/context/resources/procedures/evidence-maintenance.md +20 -0
- package/providers/context/resources/procedures/knowledge-review.md +24 -0
- package/providers/context/resources/procedures/package-output.md +37 -0
- package/providers/context/resources/procedures/project-configuration.md +21 -0
- package/providers/context/resources/procedures/prose-align.md +68 -0
- package/providers/context/resources/procedures/prose-compile.md +23 -0
- package/providers/context/resources/procedures/source-boundary.md +48 -0
- package/{plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md → providers/context/resources/procedures/source-capture-detailed.md} +41 -19
- package/providers/context/resources/procedures/verify-and-repair.md +19 -0
- package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/candidate-resolution.md +17 -2
- package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/density-profile.md +11 -0
- package/{plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/gates.md +13 -0
- package/{plugins/cursor/skills/skill-prose-align/references/internal-procedures → providers/context/resources/semantic/align}/structure-planning.md +62 -12
- package/providers/context/resources/semantic/compile/index.md +31 -0
- package/providers/context/resources/views/package-current.yaml +6 -0
- package/providers/context/resources/views/review-current.yaml +6 -0
- package/providers/context/resources/views/source-current.yaml +6 -0
- package/providers/context/resources/views/structure-current.yaml +6 -0
- package/providers/context/resources/views/verification-current.yaml +6 -0
- package/providers/context/resources/views/workspace-current.yaml +6 -0
- package/providers/context/schemas/evidence-maintenance-input.schema.json +30 -0
- package/providers/context/schemas/prose-structure-batch.schema.json +35 -0
- package/providers/context/schemas/source-batch-input.schema.json +189 -0
- package/providers/context/scripts/render-context-view.mjs +21 -0
- package/plugins/claude/skills/skill-continue-workflow/SKILL.md +0 -235
- package/plugins/claude/skills/skill-init-workspace/SKILL.md +0 -74
- package/plugins/claude/skills/skill-package-output/SKILL.md +0 -180
- package/plugins/claude/skills/skill-prose-align/SKILL.md +0 -322
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/claude/skills/skill-prose-compile/SKILL.md +0 -287
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/claude/skills/skill-review-gate/SKILL.md +0 -138
- package/plugins/claude/skills/skill-source-scope/SKILL.md +0 -525
- package/plugins/claude/skills/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +0 -525
- package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/codex/skills/init/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +0 -525
- package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +0 -235
- package/plugins/cursor/skills/skill-init-workspace/SKILL.md +0 -74
- package/plugins/cursor/skills/skill-package-output/SKILL.md +0 -180
- package/plugins/cursor/skills/skill-prose-align/SKILL.md +0 -322
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/cursor/skills/skill-prose-compile/SKILL.md +0 -287
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +0 -138
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +0 -525
- package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/skills/context-continue/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +0 -525
- package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/skills/context-init/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +0 -525
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: capture-source
|
|
3
|
-
description: >
|
|
4
|
-
Capture local Markdown or Lark/Feishu document sources through registered
|
|
5
|
-
Context sources and declared capture phases. Use the local `context` CLI for
|
|
6
|
-
workspace writes.
|
|
7
|
-
tools:
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Capture
|
|
12
|
-
|
|
13
|
-
Current capture discipline for document sources. The executable path is source
|
|
14
|
-
registration plus the declared capture phase flow:
|
|
15
|
-
|
|
16
|
-
- local Markdown/MDX file source: `context source add file [YYYYMMDD] --module <module> --local <path>`
|
|
17
|
-
followed by `context run capture:file:YYYYMMDD/<module> --format json`;
|
|
18
|
-
- Lark/Feishu source: `context source add lark [YYYYMMDD] --module <module> ...`
|
|
19
|
-
followed by `context run capture:lark:YYYYMMDD/<module> --format json`;
|
|
20
|
-
- refresh: rerun the same declared capture phase after status or the user asks
|
|
21
|
-
for recapture.
|
|
22
|
-
|
|
23
|
-
Use only commands surfaced by the current status output or capture phase.
|
|
24
|
-
For a user-confirmed multi-document batch, `context status --format json`
|
|
25
|
-
returns every uncaptured module in `routing.command_plan`. Run the complete
|
|
26
|
-
list in order; a successful module is omitted from the next status result.
|
|
27
|
-
When the user explicitly asks to capture, ingest, fetch, read, or include exact
|
|
28
|
-
file/Lark paths or URLs, that request is the read permission for those sources;
|
|
29
|
-
do not repeat the question after registration. A mere mention, possible-source
|
|
30
|
-
discussion, or register-only request is not permission, and an explicit refusal
|
|
31
|
-
always wins.
|
|
32
|
-
Register several file/Lark/repo sources with `context source add batch [date]
|
|
33
|
-
--input <yaml|json|->`; do not launch multiple `source add` processes in
|
|
34
|
-
parallel. Repo batch items require `module`; file/Lark items may omit it and use
|
|
35
|
-
the module returned by the CLI. A write-lock error means another Context mutation is active: wait for
|
|
36
|
-
it to finish and retry rather than editing registry files.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Workflow
|
|
41
|
-
|
|
42
|
-
Capture is entirely CLI-driven — your role is to register the right source,
|
|
43
|
-
declare the matching capture phase, run the current `context run capture:*`
|
|
44
|
-
command, and relay its output. Never hand-write captured source snapshots: the
|
|
45
|
-
CLI owns normalisation (NFC, BOM strip, line endings) and the `content_hash`
|
|
46
|
-
contract, so any manual edit breaks idempotency.
|
|
47
|
-
|
|
48
|
-
### Code capture diagnostics
|
|
49
|
-
|
|
50
|
-
Do not run hand-written dependency preflight commands before code extraction or
|
|
51
|
-
document capture. The CLI owns configured runner/plugin resolution and returns
|
|
52
|
-
structured `agent_hints[]` when a runner or remote-document helper is missing or
|
|
53
|
-
misconfigured.
|
|
54
|
-
|
|
55
|
-
If code extraction capture fails with install or runner hints, surface the CLI's `agent_hints[]` command exactly as printed. Ask the user once whether to run that command on their behalf when it touches shared state. If approved, run the exact command from `agent_hints[0].command`, then retry the same capture command. If declined, leave the command visible so the user can run it manually. Do not inline extraction packages, do not hand-write code snapshots, and do not continue with partial capture.
|
|
56
|
-
|
|
57
|
-
Invocation note: document capture and code extraction do not run through `npx`.
|
|
58
|
-
Use the installed `context` CLI and the declared phase command returned by
|
|
59
|
-
`context status` or the phase view. When external helpers are missing, surface
|
|
60
|
-
the CLI's structured install hints instead of substituting your own package
|
|
61
|
-
manager or version.
|
|
62
|
-
|
|
63
|
-
### Route by source boundary
|
|
64
|
-
|
|
65
|
-
Before choosing a local Markdown capture route, honor the surrounding task context. Driver documents such as run instructions, handbooks, READMEs, plans, feedback issues, corpus/index/manifests, and batch lists are not Context sources unless the user explicitly asks to ingest them. Capture only ingest targets that are already explicit in the user request; if they are missing, ask one clarification instead of capturing the driver document.
|
|
66
|
-
|
|
67
|
-
- One or more local `.md` / `.mdx` files or a local documentation folder to ingest →
|
|
68
|
-
register one file source with the user-confirmed boundary:
|
|
69
|
-
`context source add file [YYYYMMDD] --module <module> --local <file-or-folder>`.
|
|
70
|
-
The CLI returns the `YYYYMMDD/module` identity to use in project phases. More
|
|
71
|
-
than one file module may share the date. For an explicit
|
|
72
|
-
batch inside a broader folder, preserve the user's include list on source
|
|
73
|
-
registration. Default file capture handles `.md`. If the CLI reports
|
|
74
|
-
document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
|
|
75
|
-
stop and confirm whether the selected boundary is a documentation site before
|
|
76
|
-
changing capture configuration. For MDX documentation sites that use
|
|
77
|
-
`_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
|
|
78
|
-
keep `_meta.json` only when it is route metadata for the selected document
|
|
79
|
-
folder. The CLI captures it as metadata and generates
|
|
80
|
-
`__context_route_metadata.md` as mechanical route evidence; it also extracts
|
|
81
|
-
static MDX component props/children into `__context_mdx_component_text.md`
|
|
82
|
-
when components carry user-facing text. Declare
|
|
83
|
-
`captureFile({ source: source("<date>", "<module>", { type: "file" }), processor: mdxJsonDocs() })`, then
|
|
84
|
-
run `context run capture:file:<date>/<module> --format json`. If the selected MDX page
|
|
85
|
-
is empty or only mounts runtime-rendered content, tell the user that capture
|
|
86
|
-
found a document-site shell and ask for the rendered-site or data-source
|
|
87
|
-
boundary instead of inventing body text.
|
|
88
|
-
- A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
|
|
89
|
-
`context source add lark [YYYYMMDD] --module <module> --url <url>` or the
|
|
90
|
-
matching token flag. Register every requested document under the same date;
|
|
91
|
-
do not ask for `YYYYMMDD-2`. Declare
|
|
92
|
-
`captureLark({ source: source("<date>", "<module>", { type: "lark" }) })`,
|
|
93
|
-
then run `context run capture:lark:<date>/<module> --format json`.
|
|
94
|
-
- Mixed local document and Lark document batches are separate sources unless
|
|
95
|
-
the current CLI explicitly offers a combined source contract. Do not write an
|
|
96
|
-
Agent-side URL/file loop.
|
|
97
|
-
- Refresh or recapture request for an already registered file/Lark source →
|
|
98
|
-
rerun the same declared capture phase. The CLI appends a new snapshot only
|
|
99
|
-
when content changes and never overwrites prior snapshots.
|
|
100
|
-
- Code package extraction is not document capture. Route code source selection
|
|
101
|
-
through `skill-source-scope` extraction preview and the declared extract
|
|
102
|
-
phase. Do not invent a document capture path for code.
|
|
103
|
-
- Conversation notes, decisions, and revision intents are not document capture
|
|
104
|
-
sources in the current workflow unless the CLI status or project-specific
|
|
105
|
-
phase exposes an explicit note source contract. If absent, record the user
|
|
106
|
-
guidance in the conversation and use it as pre-align hints, not as a snapshot
|
|
107
|
-
write.
|
|
108
|
-
|
|
109
|
-
Do not discover files with `find` / `ls` when the user already supplied paths.
|
|
110
|
-
If the include set is large, summarize it and ask for confirmation before
|
|
111
|
-
registration; do not read file bodies before capture permission is clear.
|
|
112
|
-
|
|
113
|
-
### Output Handling
|
|
114
|
-
|
|
115
|
-
Report the CLI output verbatim. If the CLI reports `N sources changed`, suggest the right next step:
|
|
116
|
-
|
|
117
|
-
- Run `context status --format json` and use its `state`, `routing`, and
|
|
118
|
-
`command_plan`; if status returns `needs-capture-phase`, first perform the
|
|
119
|
-
exact `routing.configuration` edit and rerun status.
|
|
120
|
-
- While status remains `needs-capture`, execute every returned capture command
|
|
121
|
-
for the already confirmed batch before asking another naming, collection, or
|
|
122
|
-
read-permission question.
|
|
123
|
-
- If status reports `captured-ready-to-investigate`, suggest the returned
|
|
124
|
-
`context run align:<type>:<source>:<collection> --view read-plan --format json`
|
|
125
|
-
command and hand off to `skill-prose-align`.
|
|
126
|
-
- If status reports `needs-structure` or `structure-ready`, follow the returned
|
|
127
|
-
align/compile command instead of naming a generic slash command.
|
|
128
|
-
- If status reports `compile-ready-for-review`, route to the review gate.
|
|
129
|
-
- If the source was code-only and status reports pending code projection,
|
|
130
|
-
follow the CLI-owned extract/compile route returned by status.
|
|
131
|
-
|
|
132
|
-
Never suggest prose compile or hand-built document knowledge for a code-only
|
|
133
|
-
source. Code sources become active knowledge only through the declared
|
|
134
|
-
extraction/review route returned by `context status`.
|
|
135
|
-
|
|
136
|
-
If capture is rejected because another phase or write gate is active, do not
|
|
137
|
-
discard it automatically. Explain the active state from `context status`, follow
|
|
138
|
-
that phase when it is the intended task, and ask the user before discarding
|
|
139
|
-
in-progress work when a current project command exists. If the user expected a
|
|
140
|
-
different repository/workspace, change to the confirmed workspace root before
|
|
141
|
-
retrying capture.
|
|
142
|
-
|
|
143
|
-
## Final Report
|
|
144
|
-
|
|
145
|
-
Report in the user's conversation language. Translate section headings into the user's language instead of copying the English labels below verbatim. Optimize for human readability: use document titles instead of source ids, package names instead of internal source id strings, and human-readable kind labels ("local markdown", "Feishu doc", "code package") instead of internal tokens. Do not surface content hashes, snapshot digests, internal payload identifiers, or absolute file paths.
|
|
146
|
-
|
|
147
|
-
Stable structure:
|
|
148
|
-
|
|
149
|
-
1. Completion headline. Single line with the action verb plus core counts: how
|
|
150
|
-
many sources were captured this round, broken down by `new` / `updated` /
|
|
151
|
-
`unchanged`. Capture data from the current `context run capture:* --format
|
|
152
|
-
json` result summary, or per-source statuses when no aggregate is returned.
|
|
153
|
-
2. Per-source list grouped by status. Show each captured source under one of three groups (`new` / `updated` / `unchanged`); within each group list the document title (`source.title`), kind label, and a short delta indicator for updated sources (for example added/removed line counts when the CLI returns them; otherwise "content changed"). Cache-hit code packages belong in `unchanged`. Omit groups that are empty.
|
|
154
|
-
3. Pending phase signals. When `context status --format json` reports follow-up
|
|
155
|
-
work tied to this capture (sources pending align, sources pending compile,
|
|
156
|
-
refreshed sources pending recompile, code sources pending projection),
|
|
157
|
-
summarize each as a single line naming the work and which sources are
|
|
158
|
-
affected. Omit the section entirely when there is no pending follow-up.
|
|
159
|
-
4. Next step. Single command suggestion driven by status: the returned
|
|
160
|
-
`context run align:<type>:<source>:<collection> ...` command when structure work is
|
|
161
|
-
pending, the returned `context run compile:<type>:<source>:<collection> ...`
|
|
162
|
-
command when prose compile work is pending, or the CLI-owned code projection
|
|
163
|
-
command when code projection is pending. If nothing is pending, say so
|
|
164
|
-
explicitly.
|
|
165
|
-
|
|
166
|
-
Do not include raw CLI diagnostics, agent_hints content, schema names, or phase
|
|
167
|
-
payload identifiers in the report. Those belong in earlier troubleshooting
|
|
168
|
-
output, not in the completion summary.
|
|
169
|
-
|
|
170
|
-
## Reference
|
|
171
|
-
|
|
172
|
-
### Missing Dependency Recovery
|
|
173
|
-
|
|
174
|
-
If the CLI returns `agent_hints[]` for a missing code runner or plugin package, stop and surface the hint. Ask the user once for permission to run `agent_hints[0].command` (the CLI has already picked the correct package manager — `npm install -g` or `bun install -g` — based on how `context` itself was installed). If approved, run that exact command via `Bash` and then retry the same capture; if declined, leave the command visible for manual install. Never substitute a different package manager or version.
|
|
175
|
-
|
|
176
|
-
If the CLI prints a missing-dependency error like `lark-cli not installed`, walk the user through installation:
|
|
177
|
-
|
|
178
|
-
1. Ask once up-front whether to proceed with install. If no → stop and tell the user to install manually from the tool's official README, then re-run.
|
|
179
|
-
2. `WebFetch` the tool's official README (for `lark-cli` that's `https://github.com/larksuite/cli/blob/main/README.md#quick-start-ai-agent`).
|
|
180
|
-
3. For each command the README prescribes for the user's platform, show the command then call `Bash`. The host's per-tool permission prompt is the user's confirmation surface; don't add extra y/n questions between commands.
|
|
181
|
-
4. Stop on any failure; surface stderr verbatim.
|
|
182
|
-
5. After success, tell the user to rerun the current Context command that
|
|
183
|
-
failed.
|
|
184
|
-
|
|
185
|
-
### Language Policy
|
|
186
|
-
|
|
187
|
-
Your prose to the user follows the user's conversation language. CLI commands, flag names, URLs, env-var names, binary names, source-ids stay English.
|
|
188
|
-
|
|
189
|
-
### Invariants
|
|
190
|
-
|
|
191
|
-
- Captured source snapshots are immutable post-write — the CLI only ever appends new snapshots.
|
|
192
|
-
- The source registry is authoritative; derived index files are not Agent phase
|
|
193
|
-
inputs.
|
|
194
|
-
- Local `.md` / `.mdx` source identity follows the captured file's stable origin path, not its H1/title. If the user edits the title but captures the same path again, the CLI appends a new snapshot to the same `local:*` source.
|
|
195
|
-
- In `--format json`, code capture runner cache state is authoritative in `result.runner.cacheMode`: `prepared` means a workspace runner was prepared, `cached` means workspace cache hit, and `bypass` means `--no-runner-cache` used a temporary runner directory instead of the workspace runner cache.
|
|
196
|
-
- Code extraction runner evidence is derived by the CLI from emitted source files. Do not ask users to configure `evidence.mode`; rerun capture after fixing the runner emit output.
|
|
197
|
-
- Code extraction snapshots ship with `evidence.mode: none`; symbols/files/edges are indexed inside the code bucket. Do not ask users to inspect or repair a code `.evidence` manifest.
|
|
198
|
-
- Code extraction/projection is separate from document capture. Materialize code
|
|
199
|
-
knowledge through the declared extract/code projection flow before prose align
|
|
200
|
-
attaches documentation to code Nodes.
|
|
201
|
-
- On duplicate capture of the same URL: identical `content_hash` → CLI skips with `unchanged`; different hash → CLI appends a new snapshot.
|
package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-continue-workflow
|
|
3
|
-
description: >
|
|
4
|
-
Internal procedure invoked by the public Context continuation entry; not a user slash command.
|
|
5
|
-
Runs the status-driven Context process, executes safe mechanical next steps,
|
|
6
|
-
and delegates human gates to source, review, and package procedures.
|
|
7
|
-
tools:
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# skill-continue-workflow
|
|
12
|
-
|
|
13
|
-
Continue an existing Context workspace from its current state.
|
|
14
|
-
|
|
15
|
-
## TL;DR
|
|
16
|
-
|
|
17
|
-
- Use this only inside an initialized Context workspace. If the user is starting
|
|
18
|
-
a new knowledge workspace or a new batch from a raw project/repo root, do not
|
|
19
|
-
run `context status` first; use the init workflow and complete setup before
|
|
20
|
-
returning here.
|
|
21
|
-
- If `context status` reports `workspace-not-found` with a configured
|
|
22
|
-
`context.workspaceDir`, stop. If the directory exists, enter it and rerun
|
|
23
|
-
status. If it does not exist, ask whether to initialize it through the init
|
|
24
|
-
workflow; do not treat the host repository root as the workspace.
|
|
25
|
-
- There is no `context continue` CLI command. Start with `context status`.
|
|
26
|
-
- `context status` and CLI diagnostics are the source of truth.
|
|
27
|
-
- If the user explicitly authorizes fully managed operation in the current
|
|
28
|
-
conversation, start and continue that loop with `context status --managed
|
|
29
|
-
--format json`, then execute its managed `command_plan`. This authority is
|
|
30
|
-
conversation-only: do not write it into `defineProject`, project files, or
|
|
31
|
-
reuse it in a later conversation.
|
|
32
|
-
- Inspect `declarationGraph` and `configurationGaps`. Before structure
|
|
33
|
-
confirmation they are configuration warnings; after confirmation, a missing
|
|
34
|
-
compile route is a hard gate. Never substitute a compile phase from another
|
|
35
|
-
collection.
|
|
36
|
-
- Treat `unclassifiedDocumentTargets`, `pendingStructureTargets`, and nonterminal
|
|
37
|
-
`structureBatch.slots` as unfinished workspace work even when the
|
|
38
|
-
current approved package is ready. A build closes only the active snapshots;
|
|
39
|
-
it does not prevent a later captured source from entering its own structure
|
|
40
|
-
round.
|
|
41
|
-
- Confirm structure per canonical source + collection slot, but batch Review
|
|
42
|
-
across the declared round. When candidates exist and
|
|
43
|
-
`pendingStructureTargets` is non-empty, follow the pending align route before
|
|
44
|
-
opening Review; deterministic close later merges every active slot.
|
|
45
|
-
- Execute safe mechanical `next:` steps; stop at semantic choices and human
|
|
46
|
-
gates.
|
|
47
|
-
- Delegate source/scope decisions to
|
|
48
|
-
`skill-source-scope.md`.
|
|
49
|
-
- Delegate review to `skill-review-gate.md`.
|
|
50
|
-
- Delegate package output choices to
|
|
51
|
-
`skill-package-output.md`.
|
|
52
|
-
- Delegate document investigation and structure confirmation to
|
|
53
|
-
`skill-prose-align.md`.
|
|
54
|
-
- Delegate source-bound prose compile requests to
|
|
55
|
-
`skill-prose-compile.md`.
|
|
56
|
-
- Do not inspect `.tmp`, `unapproved/`, `knowledge/`, `dist/`, or
|
|
57
|
-
`node_modules/@c4a/context/dist` with ad hoc scripts to decide project state.
|
|
58
|
-
- Only run commands surfaced by the current status route, current phase view,
|
|
59
|
-
review gate, verify/build gate, or package guidance. Do not invent alternate
|
|
60
|
-
lifecycle commands from memory.
|
|
61
|
-
|
|
62
|
-
<reference>
|
|
63
|
-
|
|
64
|
-
## Safe Mechanical Commands
|
|
65
|
-
|
|
66
|
-
These can run when already implied by current status and no placeholder/human
|
|
67
|
-
choice remains:
|
|
68
|
-
|
|
69
|
-
| State / hint | Allowed action |
|
|
70
|
-
|---|---|
|
|
71
|
-
| source already declared | `context source ensure`, `context source list`, `context source get` |
|
|
72
|
-
| declared phase that does not read new source body or require a semantic choice | `context run <phase-id>` |
|
|
73
|
-
| prose align evidence read | `context run align:<type>:<source>:<collection> --view <view>` |
|
|
74
|
-
| prose structure validation | `context run align:<type>:<source>:<collection> --validate --input <structure.yaml>` |
|
|
75
|
-
| prose compile evidence read | `context run compile:<type>:<source>:<collection> --view <view>` |
|
|
76
|
-
| prose compile action validation | `context run compile:<type>:<source>:<collection> --validate --input <compile-actions.yaml>` |
|
|
77
|
-
| copied review payload supplied by user | `context review apply <payload-file>` |
|
|
78
|
-
| close required after review | `context close --format json` |
|
|
79
|
-
| package already declared and close is clean | `context build` |
|
|
80
|
-
| validation requested | `context verify` |
|
|
81
|
-
|
|
82
|
-
Capture phases are not safe mechanical commands by default. `capture:file:*`
|
|
83
|
-
and `capture:lark:*` read local or remote source bodies and update committed
|
|
84
|
-
snapshots, so they require the source read-permission gate unless the current
|
|
85
|
-
turn already contains explicit user confirmation for that exact source.
|
|
86
|
-
An explicit request to capture, ingest, fetch, read, or include the exact
|
|
87
|
-
file/Lark path or URL is that confirmation; do not ask again after registration.
|
|
88
|
-
Mere mention, source discussion, or a register-only request is not confirmation,
|
|
89
|
-
and an explicit refusal always overrides inferred permission.
|
|
90
|
-
|
|
91
|
-
## Human Gates
|
|
92
|
-
|
|
93
|
-
In ordinary mode, follow every gate below. In explicit current-conversation
|
|
94
|
-
managed mode, the CLI may resolve classification, extraction scope, structure
|
|
95
|
-
confirmation, Review, and package-output choices without pausing. It still
|
|
96
|
-
must not infer a source boundary, read an unapproved source body, perform an
|
|
97
|
-
external repository/system operation, or bypass validation/verify errors.
|
|
98
|
-
|
|
99
|
-
Stop and ask, or wait for user input, for:
|
|
100
|
-
|
|
101
|
-
- `Human gate:` in CLI output.
|
|
102
|
-
- placeholders such as `<name>`, `<repo-or-subdir>`, `<phase-id>`, `<collection>`.
|
|
103
|
-
- missing source selection.
|
|
104
|
-
- source boundary/name decisions, because they affect `knowledge/` paths and
|
|
105
|
-
`source_ref` prefixes.
|
|
106
|
-
- source repo operations: clone, checkout, reset, fetch, install, build, test.
|
|
107
|
-
- source scope, package/subdirectory, symbol group, or glob choices.
|
|
108
|
-
- file/Lark capture or refresh, including capture preview, until the user has
|
|
109
|
-
confirmed which local path or remote document may be read.
|
|
110
|
-
- review approval/rejection decisions.
|
|
111
|
-
- document structure confirmation, section ownership, edge confirmation,
|
|
112
|
-
rewrite intent, conflict, weak-evidence, or cross-document organization
|
|
113
|
-
choices unless they are being handled through prose align/compile evidence
|
|
114
|
-
views and validation.
|
|
115
|
-
- package output type or template choices.
|
|
116
|
-
|
|
117
|
-
When a human gate has a fixed small option set, use the host's native
|
|
118
|
-
multi-choice tool when available (Claude Code `AskUserQuestion`, Codex's
|
|
119
|
-
available native user-input tool such as `request_user_input` when exposed,
|
|
120
|
-
Cursor Plan Mode `AskQuestion`). If unavailable, fall back to Markdown `A/B/C`
|
|
121
|
-
choices. Each option must include the effect of choosing it.
|
|
122
|
-
|
|
123
|
-
</reference>
|
|
124
|
-
|
|
125
|
-
<procedures>
|
|
126
|
-
|
|
127
|
-
### Step 0 — Confirm Workspace Exists
|
|
128
|
-
|
|
129
|
-
If the current task is to create a new Context workspace, or the user has not
|
|
130
|
-
identified an initialized Context workspace root for this turn, do not continue
|
|
131
|
-
with this workflow. Initialize through the public Context init entry or
|
|
132
|
-
`context init` first, run the setup command printed by init, then return to this workflow from the
|
|
133
|
-
created workspace.
|
|
134
|
-
|
|
135
|
-
### Step 1 — Read Status
|
|
136
|
-
|
|
137
|
-
Run:
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
context status
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Use `context status --managed --format json` instead only when the current
|
|
144
|
-
conversation explicitly contains fully managed authorization. Keep `--managed`
|
|
145
|
-
on commands returned by that status loop; otherwise never add it.
|
|
146
|
-
|
|
147
|
-
Use the output as evidence. Explain status and next step in the user's language;
|
|
148
|
-
do not forward a long raw transcript unless requested.
|
|
149
|
-
|
|
150
|
-
### Step 2 — Route The State
|
|
151
|
-
|
|
152
|
-
1. If status says `missing-source`, `needs-capture-phase`, `needs-capture`,
|
|
153
|
-
`needs-extract-phase`, or `ready-to-extract`,
|
|
154
|
-
source boundary/name is unclear, source scope is unclear, or an extract
|
|
155
|
-
phase needs first-run scope confirmation, follow
|
|
156
|
-
`skill-source-scope.md`.
|
|
157
|
-
When `routing.configuration` is present, make only that declared project
|
|
158
|
-
configuration change and rerun status. Otherwise follow
|
|
159
|
-
`routing.command_plan`: run `immediate` items directly and wait for current-
|
|
160
|
-
conversation confirmation before `after-human-confirmation` items.
|
|
161
|
-
For mixed sources, status intentionally returns `ready-to-extract` before
|
|
162
|
-
`captured-ready-to-investigate` while all document snapshots are captured,
|
|
163
|
-
document structure is untouched, and code extraction is missing, pending,
|
|
164
|
-
or stale. Explain that code is processed first, then follow the exact
|
|
165
|
-
extraction preview/rerun command.
|
|
166
|
-
2. If status says `captured-ready-to-classify`, run every immediate
|
|
167
|
-
collection-neutral investigation command, summarize evidence across all
|
|
168
|
-
targets, and ask the user to confirm the proposed mainline collection(s)
|
|
169
|
-
before editing `src/index.ts`. If status says `needs-prose-configuration`, apply only the generic
|
|
170
|
-
`routing.configuration` change in `src/index.ts`, rerun status, and do not
|
|
171
|
-
create a new workspace. If status says `captured-ready-to-investigate` or `needs-structure`, or the
|
|
172
|
-
user asks to split, merge, classify, relate, or semantically organize
|
|
173
|
-
document evidence before draft pages exist, follow
|
|
174
|
-
`skill-prose-align.md`.
|
|
175
|
-
3. If status says `needs-prose-compile` or `structure-ready`, or the user asks
|
|
176
|
-
to turn confirmed structure into source-bound draft pages, follow
|
|
177
|
-
`skill-prose-compile.md`.
|
|
178
|
-
4. If the latest phase result has `next_action.human_gate=false`, follow its
|
|
179
|
-
command and do not invent a Review gate. This includes
|
|
180
|
-
`continue_compile_batch` and `continue-codegraph-batch`: finish the whole
|
|
181
|
-
prepared round first. If status says
|
|
182
|
-
`compile-ready-for-review`, or the latest result has
|
|
183
|
-
`next_action.human_gate=true`, follow
|
|
184
|
-
`skill-review-gate.md`.
|
|
185
|
-
5. If status says `compile-close-needed`, run `context close --format json`
|
|
186
|
-
unless CLI diagnostics require human repair, then return to **Step 1**.
|
|
187
|
-
6. If status says `ready-to-build`, `built`, `needs-package-output`, or approved knowledge exists but
|
|
188
|
-
package output is not chosen or declared,
|
|
189
|
-
follow `skill-package-output.md`.
|
|
190
|
-
`built` is terminal only when both `unclassifiedDocumentTargets` and
|
|
191
|
-
`pendingStructureTargets` are empty. Use `structureBatch` for the complete
|
|
192
|
-
multi-source round: evidence Views are parallel-safe; stage, confirm, Review
|
|
193
|
-
apply, and close mutations are serial.
|
|
194
|
-
7. If the next command is safe per [Safe Mechanical Commands](#safe-mechanical-commands),
|
|
195
|
-
run it and return to **Step 1**.
|
|
196
|
-
8. If the next command crosses a [Human Gate](#human-gates), ask or wait; do not
|
|
197
|
-
guess.
|
|
198
|
-
|
|
199
|
-
### Step 3 — Execute Safely
|
|
200
|
-
|
|
201
|
-
Before editing `src/index.ts` or package templates, read:
|
|
202
|
-
|
|
203
|
-
```text
|
|
204
|
-
node_modules/@c4a/context/docs/guides/agent-guide.md
|
|
205
|
-
node_modules/@c4a/context/docs/guides/package-outputs.md
|
|
206
|
-
node_modules/@c4a/context/docs/reference/project-api.md
|
|
207
|
-
node_modules/@c4a/context/docs/reference/package-templates.md
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
Do not write one-off scripts to parse source packages, count extracted symbols,
|
|
211
|
-
or sample candidates. Use `context source inspect` and the extract no-write
|
|
212
|
-
preview command.
|
|
213
|
-
|
|
214
|
-
### Step 4 — Report
|
|
215
|
-
|
|
216
|
-
Report only the meaningful state transition: commands run, current status,
|
|
217
|
-
human gate reached, and the precise user decision needed next. Never present
|
|
218
|
-
`context build`, `context verify`, or file counts as proof that a deliverable is
|
|
219
|
-
usable; inspect generated package structure when package output is involved.
|
|
220
|
-
|
|
221
|
-
### Step 5 — Self-verify Checklist
|
|
222
|
-
|
|
223
|
-
- [ ] `context status` (or explicitly authorized `context status --managed`) was
|
|
224
|
-
run first. If not, return to **Step 1**.
|
|
225
|
-
- [ ] No human gate was crossed without either direct user confirmation or the
|
|
226
|
-
current conversation's managed authorization. If not, stop and report the
|
|
227
|
-
protocol error.
|
|
228
|
-
- [ ] No ad hoc file/script probing replaced CLI views. If not, discard that
|
|
229
|
-
conclusion and use the CLI view.
|
|
230
|
-
|
|
231
|
-
</procedures>
|
|
232
|
-
If top-level `state`, `next`, or `routing.command_plan` contradicts
|
|
233
|
-
`draftCandidates`, `pendingReview`, `close.state`, package freshness, or verify
|
|
234
|
-
counts, stop instead of rerunning a completed phase. Report
|
|
235
|
-
`status-route-conflict` and preserve the detailed status output for diagnosis.
|
package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-init-workspace
|
|
3
|
-
description: >
|
|
4
|
-
Internal procedure invoked by the public Context init entry; not a user slash command.
|
|
5
|
-
Initializes a Context knowledge workspace, executes only safe setup follow-up,
|
|
6
|
-
then hands off to the next-step workflow until the first human gate.
|
|
7
|
-
tools:
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# skill-init-workspace
|
|
12
|
-
|
|
13
|
-
Initialize a Context workspace. The CLI creates files; the agent follows safe
|
|
14
|
-
setup hints and stops before source/scope choices.
|
|
15
|
-
|
|
16
|
-
## TL;DR
|
|
17
|
-
|
|
18
|
-
- Use `context init`; do not add any extra project-local agent setup.
|
|
19
|
-
- If init prints the standard setup `next:` command, run it instead of only
|
|
20
|
-
repeating it.
|
|
21
|
-
- After the setup command succeeds, enter the workspace and read `AGENTS.md`
|
|
22
|
-
before running `context status`.
|
|
23
|
-
- After setup, use `skill-continue-workflow.md`
|
|
24
|
-
for status-driven continuation.
|
|
25
|
-
- Stop at source registration, extraction scope, review, package output, or any
|
|
26
|
-
external repo operation that needs user choice.
|
|
27
|
-
- Explain in the user's conversation language. Keep CLI commands, flags, paths,
|
|
28
|
-
status values, JSONL keys, and copied CLI tokens unchanged.
|
|
29
|
-
|
|
30
|
-
<procedures>
|
|
31
|
-
|
|
32
|
-
### Step 1 — Run Init
|
|
33
|
-
|
|
34
|
-
1. If the user gave no directory, run `context init`.
|
|
35
|
-
2. If the user gave a directory, run `context init <project-dir>`.
|
|
36
|
-
3. If the user supplied a project name option, pass it as `--name <name>`.
|
|
37
|
-
4. Read the CLI feedback block and preserve the project root path.
|
|
38
|
-
|
|
39
|
-
### Step 2 — Execute Safe Setup
|
|
40
|
-
|
|
41
|
-
1. If CLI prints `next: cd "<project-root>" && bun install`,
|
|
42
|
-
execute that command.
|
|
43
|
-
2. If install fails, report the failure and stop.
|
|
44
|
-
3. If setup succeeds, read `<project-root>/AGENTS.md`.
|
|
45
|
-
4. After reading `AGENTS.md`, run `context status` from `<project-root>` and
|
|
46
|
-
treat that output as the current workspace state.
|
|
47
|
-
|
|
48
|
-
### Step 3 — Handoff Or Stop
|
|
49
|
-
|
|
50
|
-
1. If status is ready for a safe mechanical step, continue with
|
|
51
|
-
`skill-continue-workflow.md`.
|
|
52
|
-
2. If status is `missing-source`, `Human gate:`, or contains placeholders such as
|
|
53
|
-
`<name>`, `<repo-or-subdir>`, `<phase-id>`, or `<collection>`, ask for the
|
|
54
|
-
missing human choice and stop. For missing sources, ask for the knowledge
|
|
55
|
-
source boundary first; do not ask for a raw source name as an isolated
|
|
56
|
-
parameter.
|
|
57
|
-
3. Do not infer repo source, source boundary, source name, package, or
|
|
58
|
-
extraction scope from cwd, parent directories, package names, monorepo
|
|
59
|
-
layout, or git remote.
|
|
60
|
-
|
|
61
|
-
### Step 4 — Report
|
|
62
|
-
|
|
63
|
-
Summarize what was initialized, what setup command ran, current status, and the
|
|
64
|
-
human choice needed next. Do not paste a long raw CLI transcript unless the user
|
|
65
|
-
asks for exact output.
|
|
66
|
-
|
|
67
|
-
### Step 5 — Self-verify Checklist
|
|
68
|
-
|
|
69
|
-
- [ ] Safe setup was executed when CLI provided the standard setup `next:`. If
|
|
70
|
-
not, return to **Step 2**.
|
|
71
|
-
- [ ] No repo source or extraction scope was inferred. If not, stop and ask the
|
|
72
|
-
user to confirm the source boundary and scope.
|
|
73
|
-
|
|
74
|
-
</procedures>
|