@c4a/context-cli 0.5.41-beta.7 → 0.6.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -123
- package/babel.cjs +257 -0
- package/cli.js +64438 -96584
- package/docs/quickstart.md +85 -0
- package/package.json +3 -1
- package/plugin/.claude-plugin/plugin.json.template +1 -1
- package/plugin/.codex-plugin/plugin.json.template +5 -5
- package/plugin/.cursor-plugin/plugin.json.template +1 -1
- package/plugin/README.md +105 -86
- package/plugin/README_CN.md +92 -85
- package/plugin/commands/continue.md +34 -0
- package/plugin/commands/init.md +13 -130
- package/plugin/skills/skill-continue-workflow/SKILL.md +172 -0
- package/plugin/skills/skill-init-workspace/SKILL.md +74 -0
- package/plugin/skills/skill-package-output/SKILL.md +167 -0
- package/plugin/skills/skill-prose-align/SKILL.md +296 -0
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
- package/plugin/skills/skill-prose-compile/SKILL.md +265 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
- package/plugin/skills/skill-review-gate/SKILL.md +98 -0
- package/plugin/skills/skill-source-scope/SKILL.md +406 -0
- package/plugin/skills/skill-source-scope/references/capture-source.md +180 -0
- package/plugins/.agents/plugins/marketplace.json +20 -0
- package/plugins/.claude-plugin/marketplace.json +13 -0
- package/plugins/.cursor-plugin/marketplace.json +17 -0
- package/plugins/README.md +150 -0
- package/plugins/README_CN.md +136 -0
- package/plugins/VERSION +1 -0
- package/plugins/assets/icon.svg +3 -0
- package/plugins/assets/logo.svg +3 -0
- package/plugins/assets/workflow-en.png +0 -0
- package/plugins/assets/workflow.png +0 -0
- package/plugins/claude/.claude-plugin/plugin.json +16 -0
- package/plugins/claude/.generated +1 -0
- package/plugins/claude/CLAUDE.md +5 -0
- package/plugins/claude/README.md +5 -0
- package/plugins/claude/commands/continue.md +34 -0
- package/plugins/claude/commands/init.md +21 -0
- package/plugins/claude/skills/skill-continue-workflow/SKILL.md +172 -0
- package/plugins/claude/skills/skill-init-workspace/SKILL.md +74 -0
- package/plugins/claude/skills/skill-package-output/SKILL.md +167 -0
- package/plugins/claude/skills/skill-prose-align/SKILL.md +296 -0
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
- package/plugins/claude/skills/skill-prose-compile/SKILL.md +265 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
- package/plugins/claude/skills/skill-review-gate/SKILL.md +98 -0
- package/plugins/claude/skills/skill-source-scope/SKILL.md +406 -0
- package/plugins/claude/skills/skill-source-scope/references/capture-source.md +180 -0
- package/plugins/codex/.codex-plugin/plugin.json +38 -0
- package/plugins/codex/.generated +1 -0
- package/plugins/codex/AGENTS.md +5 -0
- package/plugins/codex/README.md +5 -0
- package/plugins/codex/assets/icon.svg +3 -0
- package/plugins/codex/assets/logo.svg +3 -0
- package/plugins/codex/assets/workflow-en.png +0 -0
- package/plugins/codex/assets/workflow.png +0 -0
- package/plugins/codex/skills/continue/SKILL.md +47 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +172 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md +74 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +167 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +296 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +265 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +98 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +406 -0
- package/plugins/codex/skills/init/SKILL.md +34 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +172 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-init-workspace.md +74 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +167 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +296 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +265 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +98 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +406 -0
- package/plugins/cursor/.cursor-plugin/plugin.json +29 -0
- package/plugins/cursor/.generated +1 -0
- package/plugins/cursor/AGENTS.md +5 -0
- package/plugins/cursor/README.md +13 -0
- package/plugins/cursor/assets/icon.svg +3 -0
- package/plugins/cursor/assets/logo.svg +3 -0
- package/plugins/cursor/assets/workflow-en.png +0 -0
- package/plugins/cursor/assets/workflow.png +0 -0
- package/plugins/cursor/commands/context-continue.md +38 -0
- package/plugins/cursor/commands/context-init.md +25 -0
- package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +172 -0
- package/plugins/cursor/skills/skill-init-workspace/SKILL.md +74 -0
- package/plugins/cursor/skills/skill-package-output/SKILL.md +167 -0
- package/plugins/cursor/skills/skill-prose-align/SKILL.md +296 -0
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
- package/plugins/cursor/skills/skill-prose-compile/SKILL.md +265 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +98 -0
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +406 -0
- package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +180 -0
- package/plugins/skills/context-continue/SKILL.md +47 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +172 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-init-workspace.md +74 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +167 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +296 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +265 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +98 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +406 -0
- package/plugins/skills/context-init/SKILL.md +34 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +172 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-init-workspace.md +74 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +167 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +91 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +30 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +235 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +243 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +296 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +132 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +52 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +48 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +85 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +73 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +413 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +123 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +81 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +55 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +93 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +79 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +111 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +194 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +265 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +98 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +180 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +406 -0
- package/scripts/build-plugin.ts +70 -123
- package/plugin/commands/align.md +0 -71
- package/plugin/commands/capture.md +0 -113
- package/plugin/commands/compile.md +0 -112
- package/plugin/commands/context.md +0 -36
- package/plugin/commands/drop.md +0 -38
- package/plugin/commands/extract.md +0 -18
- package/plugin/commands/ops.md +0 -47
- package/plugin/commands/purge.md +0 -22
- package/plugin/commands/query.md +0 -22
- package/plugin/commands/status.md +0 -25
- package/plugin/skills/skill-align-workflow/SKILL.md +0 -110
- package/plugin/skills/skill-align-workflow/references/candidate-resolution.md +0 -60
- package/plugin/skills/skill-align-workflow/references/density-profile.md +0 -16
- package/plugin/skills/skill-align-workflow/references/gates.md +0 -162
- package/plugin/skills/skill-compile-close/SKILL.md +0 -127
- package/plugin/skills/skill-compile-draft/SKILL.md +0 -175
- package/plugin/skills/skill-compile-draft/references/action-domain-gates.md +0 -34
- package/plugin/skills/skill-compile-draft/references/notes.md +0 -34
- package/plugin/skills/skill-compile-draft/references/refresh-and-update.md +0 -71
- package/plugin/skills/skill-compile-draft/references/structural-challenges.md +0 -76
- package/plugin/skills/skill-compile-judge/SKILL.md +0 -112
- package/plugin/skills/skill-context-query/SKILL.md +0 -236
- package/plugin/skills/skill-drop/SKILL.md +0 -189
- package/plugin/skills/skill-semantic-reconcile/SKILL.md +0 -136
- package/plugin/skills/skill-semantic-reconcile/references/leakage-and-ownership.md +0 -31
- package/plugin/skills/skill-semantic-reconcile/references/mode-semantics.md +0 -41
- package/plugin/skills/skill-semantic-reconcile/references/scope-review-and-omit.md +0 -60
- package/plugin/skills/skill-semantic-reconcile/references/temporal-and-evidence.md +0 -58
- package/plugin/skills/skill-semantic-reconcile/references/user-confirmation.md +0 -71
- package/scripts/build-aspect-runtime.ts +0 -45
- package/templates/aspect-runtime/aspectRunnerSdk.js +0 -776
- package/templates/aspects/README.md +0 -517
- package/templates/aspects/code/README.md +0 -48
- package/templates/aspects/code/aspect.yaml +0 -21
- package/templates/aspects/design-system/README.md +0 -26
- package/templates/aspects/graphql/README.md +0 -24
- package/templates/aspects/openapi/README.md +0 -24
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-source-scope
|
|
3
|
+
description: >
|
|
4
|
+
Internal procedure invoked by the public Context continuation entry; not a user command.
|
|
5
|
+
Handles source registration, monorepo source boundaries, extract phase
|
|
6
|
+
declaration, no-write scope preview, and the pre-extraction confirmation gate.
|
|
7
|
+
tools:
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# skill-source-scope
|
|
12
|
+
|
|
13
|
+
Choose and validate what may become draft knowledge.
|
|
14
|
+
|
|
15
|
+
## TL;DR
|
|
16
|
+
|
|
17
|
+
- Missing source means the next product action is "add a knowledge source".
|
|
18
|
+
Explain that in user-facing language before showing any CLI command.
|
|
19
|
+
- Ask what source the user wants to add: local code repo/package, remote Git
|
|
20
|
+
repo/package, local Markdown/MDX document/folder, article/documentation repo as a
|
|
21
|
+
file source, or Lark/Feishu document. Current CLI can execute repo sources,
|
|
22
|
+
local file sources, and Lark document capture through the declared flow.
|
|
23
|
+
- Treat source registration as a knowledge-boundary decision, not a parameter
|
|
24
|
+
prompt. Explain that the source name becomes a stable namespace in source
|
|
25
|
+
refs, phase ids, and package naming. Approved knowledge paths are derived
|
|
26
|
+
later from collection, containment, and slug. Give concrete examples before
|
|
27
|
+
asking for confirmation.
|
|
28
|
+
- If the user already provided a path and only the source name is missing, still
|
|
29
|
+
explain what that name means. Do not ask "confirm source name" without saying
|
|
30
|
+
whether the boundary is a single package/module or a parent monorepo/subspace
|
|
31
|
+
namespace.
|
|
32
|
+
- Do not infer a source from cwd, parent directories, package names, monorepo
|
|
33
|
+
layout, or git remote.
|
|
34
|
+
- In monorepos, one source may conceptually be the whole repo/subspace or one
|
|
35
|
+
package/subdirectory. If the user wants one package manual, prefer the
|
|
36
|
+
package/subdirectory. If the user wants one unified knowledge product across
|
|
37
|
+
modules, explain that the source name becomes the repo/source identity and
|
|
38
|
+
may be used in codegraph NodeRefs such as `codegraph/product-ui/...` when the
|
|
39
|
+
extraction rules derive those refs. Current repo extraction
|
|
40
|
+
still requires choosing a concrete single-module extraction boundary before
|
|
41
|
+
running extraction; do not run extraction against an ambiguous multi-module
|
|
42
|
+
source.
|
|
43
|
+
- `extractTs.include` filters files inside the selected source; it is not a
|
|
44
|
+
package/module selector.
|
|
45
|
+
- Use `context source inspect <source-name> --format json` for module choices.
|
|
46
|
+
- Before first real extraction, generate a no-write preview and show module
|
|
47
|
+
counts plus `knowledgeTree` / `knowledgePathExamples` to the user. Use
|
|
48
|
+
`--dry-run` only in the command you execute, not as the user-facing label.
|
|
49
|
+
- Human-facing explanations must describe the extraction impact first: what code
|
|
50
|
+
files are read, what symbols become draft knowledge, what is skipped, and what
|
|
51
|
+
review gate follows. Do not lead with `extractTs`, `include`, `exportedOnly`,
|
|
52
|
+
or `reviewValidity`.
|
|
53
|
+
- Document capture has its own gate. After a file or Lark source is registered,
|
|
54
|
+
ask for permission before reading the source body, then show the capture
|
|
55
|
+
summary before handing off to material investigation and structure drafting.
|
|
56
|
+
Do not default to one page per document, and do not create final draft pages
|
|
57
|
+
directly from capture.
|
|
58
|
+
- For capture routing, output handling, missing dependency recovery, and final
|
|
59
|
+
reporting discipline, read the source capture procedure at
|
|
60
|
+
[references/capture-source.md](references/capture-source.md). Its judgment
|
|
61
|
+
rules use only the declared source/capture phase flow in this skill.
|
|
62
|
+
- Do not use unsupported source lifecycle shortcuts. There is no direct
|
|
63
|
+
source deletion or purge command in this workflow, and agents must not delete
|
|
64
|
+
`sources/`, `knowledge/`, `unapproved/`, `dist/`, or `.tmp` to simulate one.
|
|
65
|
+
If the user asks to retract, remove, or purge a source, stop and explain that
|
|
66
|
+
the current plugin exposes no approved gate for that operation.
|
|
67
|
+
|
|
68
|
+
<reference>
|
|
69
|
+
|
|
70
|
+
## Source Type Guide
|
|
71
|
+
|
|
72
|
+
When the workspace has no source, do not ask with a raw placeholder command.
|
|
73
|
+
Ask for a knowledge source in plain language and map it to the supported path:
|
|
74
|
+
|
|
75
|
+
| User source | What to ask for | Current handling |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| Local code repo | knowledge boundary, stable source name, and local repo path | Register with `context source add repo <name> --local <path>`. CLI records git root + optional `subpath`; `sources/repo/<name>` becomes an ignored symlink to the chosen repo/subdir view. |
|
|
78
|
+
| Local monorepo package/module | whether the source is the whole repo/subspace or one package/subdir; stable source name; chosen path | Register the chosen boundary as the repo source. If the user wants one package manual, register that package/subdir. If the user wants a unified subspace manual, register the subspace. Do not use `extractTs.include` as a package selector. |
|
|
79
|
+
| Remote Git repo | knowledge boundary, stable source name, remote URL, pinned commit/ref, desired package/subdir, and permission to clone | CLI does not clone automatically. After explicit user approval, the agent may clone/checkout to an ignored local path, then register that local checkout. Cloned source content must not be committed. |
|
|
80
|
+
| Local Markdown / document file or folder | document boundary, stable source name, local path, include glob if needed, and permission to read the source body | Register with `context source add file <name> --local <path>`, declare the matching capture phase, then hand off to material investigation and structure drafting after capture. Do not run capture before the user confirms read permission. |
|
|
81
|
+
| Lark / Feishu document | document URL/token, intended collection, and permission to read remotely | Register with `context source add lark <name>` plus exactly one of `--url`, `--doc-token`, or `--wiki-token`; declare the matching capture phase, then hand off to material investigation and structure drafting after capture. Explain that capture writes a committed snapshot under `sources/lark/<name>/`, supports offline verify/fresh clone reproduction, and does not write credentials. Do not fetch through ad hoc scripts. |
|
|
82
|
+
|
|
83
|
+
</reference>
|
|
84
|
+
|
|
85
|
+
<procedures>
|
|
86
|
+
|
|
87
|
+
### Step 1 — Register Only User-Chosen Sources
|
|
88
|
+
|
|
89
|
+
If no source is registered, tell the user that the next step is adding a
|
|
90
|
+
knowledge source. Use the user's language and explain that this is a boundary
|
|
91
|
+
choice:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
You are choosing what one source means for this knowledge workspace.
|
|
95
|
+
The source name becomes part of source refs and phase ids. Approved knowledge
|
|
96
|
+
paths are derived later from collection, containment, and slug. NodeRef and
|
|
97
|
+
ViewRef are identity fields, not path strings.
|
|
98
|
+
|
|
99
|
+
If the source is one package:
|
|
100
|
+
knowledge/codegraph/component-lib/...
|
|
101
|
+
repo:component-lib#symbol:...
|
|
102
|
+
capture:file:component-lib
|
|
103
|
+
dist/component-lib-kb/
|
|
104
|
+
|
|
105
|
+
If the source is one document source:
|
|
106
|
+
knowledge/architecture/entity/example.md
|
|
107
|
+
file:product-docs/getting-started.md#span:...
|
|
108
|
+
align:file:product-docs:architecture
|
|
109
|
+
dist/product-docs-kb/
|
|
110
|
+
|
|
111
|
+
If the source is a parent monorepo/subspace namespace, later multi-module
|
|
112
|
+
outputs can be shaped like:
|
|
113
|
+
knowledge/codegraph/product-ui/component-web/...
|
|
114
|
+
knowledge/codegraph/product-ui/component-lynx/...
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If the source already points at one package/module root, the path uses the
|
|
118
|
+
source name once. An extra module/package segment is only expected when the
|
|
119
|
+
chosen source boundary intentionally covers multiple modules. In the current workflow, treat that
|
|
120
|
+
parent source as a planning/inspection boundary first; choose a concrete
|
|
121
|
+
package/subdirectory source before real extraction.
|
|
122
|
+
|
|
123
|
+
When the user has already provided a path, describe the current interpretation
|
|
124
|
+
before asking for the name:
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
I am treating this path as the source boundary:
|
|
128
|
+
<path>
|
|
129
|
+
|
|
130
|
+
If this path is one package/module, the source name will be used directly:
|
|
131
|
+
source refs such as repo:<source-name>#...
|
|
132
|
+
|
|
133
|
+
If this path is a parent monorepo/subspace that contains multiple modules, the
|
|
134
|
+
source name becomes the parent source namespace for grouped codegraph NodeRefs
|
|
135
|
+
when extraction derives those refs:
|
|
136
|
+
knowledge/codegraph/<source-name>/<module-name>/...
|
|
137
|
+
|
|
138
|
+
For the current extraction flow, a multi-module parent source is used for
|
|
139
|
+
inspection/planning first. Before reading code, we still need a concrete
|
|
140
|
+
package/subdirectory boundary.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Then ask for one of:
|
|
144
|
+
|
|
145
|
+
- local code repo or package path;
|
|
146
|
+
- remote Git repo URL plus pinned commit/ref and target package/subdir;
|
|
147
|
+
- local document path;
|
|
148
|
+
- Lark/Feishu document URL.
|
|
149
|
+
|
|
150
|
+
Do not ask "what is the source name?" as the first or only question. Ask what
|
|
151
|
+
they want the knowledge source to cover, then propose a source name derived from
|
|
152
|
+
that boundary and explain the path impact.
|
|
153
|
+
|
|
154
|
+
Good user-facing wording:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
Next we need to add a knowledge source.
|
|
158
|
+
|
|
159
|
+
If you only want a manual for the component package, choose that package
|
|
160
|
+
directory as the source boundary, for example:
|
|
161
|
+
name: component-lib
|
|
162
|
+
path: /repo/packages/component-lib
|
|
163
|
+
|
|
164
|
+
If you want one manual for the whole subspace, choose the subspace root:
|
|
165
|
+
name: product-ui
|
|
166
|
+
path: /repo/subspaces/product-ui
|
|
167
|
+
|
|
168
|
+
The name is not just a label. It will appear in source refs such as
|
|
169
|
+
repo:component-lib#... and in phase ids such as extract:component-lib:codegraph.
|
|
170
|
+
Approved paths are derived from collection, containment, and slug. NodeRef and
|
|
171
|
+
ViewRef are identity fields, not path strings.
|
|
172
|
+
|
|
173
|
+
For a unified subspace package shape, a parent source name such as `product-ui`
|
|
174
|
+
lets the output group child modules under that namespace:
|
|
175
|
+
knowledge/codegraph/product-ui/component-web/...
|
|
176
|
+
knowledge/codegraph/product-ui/component-lynx/...
|
|
177
|
+
|
|
178
|
+
Current extraction can inspect a parent source, but it should extract from a
|
|
179
|
+
confirmed single package/subdirectory source. If this path is a parent source,
|
|
180
|
+
I will show the module tree first and ask which package(s) to use before
|
|
181
|
+
reading code.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Mention the CLI command only as an implementation detail after the user chooses
|
|
185
|
+
a supported repo source.
|
|
186
|
+
|
|
187
|
+
For a local repo source, ask for:
|
|
188
|
+
|
|
189
|
+
- source boundary and stable source name;
|
|
190
|
+
- local repo or package/subdirectory path;
|
|
191
|
+
- remote/ref only when not inferable or when the user wants an explicit pin.
|
|
192
|
+
|
|
193
|
+
After the user provides the choice, run:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
context source add repo <name> --local <repo-or-subdir>
|
|
197
|
+
context source ensure
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Add `--remote` / `--ref` only when the user gave explicit values.
|
|
201
|
+
|
|
202
|
+
For a remote Git repo source, ask for permission before clone/checkout. If the
|
|
203
|
+
user approves, clone to an ignored local path, checkout the requested commit,
|
|
204
|
+
then register that local checkout with `context source add repo`. Do not commit
|
|
205
|
+
cloned source content.
|
|
206
|
+
|
|
207
|
+
For local Markdown/MDX document sources, after the user confirms the boundary, run:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
context source add file <name> --local <file-or-folder>
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Default file capture handles Markdown. If `context source add file`,
|
|
214
|
+
`context source inspect`, `context status`, or capture output reports that the
|
|
215
|
+
source looks like an MDX documentation site, stop at the source boundary gate
|
|
216
|
+
and ask the user to confirm that interpretation before changing `src/index.ts`.
|
|
217
|
+
For MDX documentation sites that use `_meta.json` route metadata, declare
|
|
218
|
+
`captureFile({ source: source("<name>"), processor: mdxJsonDocs() })` in
|
|
219
|
+
`src/index.ts`; included `_meta.json` files are route metadata, and the CLI
|
|
220
|
+
generates `__context_route_metadata.md` as mechanical route evidence. Use
|
|
221
|
+
`--include` only when the approved boundary is narrower than the folder. Then
|
|
222
|
+
explain that the next operation reads the approved document files and writes a
|
|
223
|
+
committed snapshot under `sources/file/<name>/`. After the user confirms read
|
|
224
|
+
permission, summarize the `src/index.ts` change or show an equivalent diff
|
|
225
|
+
summary, and run the capture phase.
|
|
226
|
+
Apply [references/capture-source.md](references/capture-source.md) for route
|
|
227
|
+
selection, dependency recovery, output handling, and final reporting, using the
|
|
228
|
+
current capture phase command returned by `context status`.
|
|
229
|
+
|
|
230
|
+
For Lark/Feishu document sources, register the source but do not fetch content
|
|
231
|
+
with ad hoc scripts. Explain which remote document or wiki token will be read,
|
|
232
|
+
that the snapshot is written under `sources/lark/<name>/`, that committed
|
|
233
|
+
snapshots enable offline verify and fresh-clone reproduction, that whether to
|
|
234
|
+
add extra ignore rules is a business repository decision, and that access
|
|
235
|
+
credentials are not written to the workspace. Use the declared capture/align
|
|
236
|
+
flow only after the user confirms remote reading. After declaring
|
|
237
|
+
`captureLark({ source: source("<name>") })`, summarize the `src/index.ts`
|
|
238
|
+
change or show an equivalent diff summary.
|
|
239
|
+
Apply [references/capture-source.md](references/capture-source.md) for route
|
|
240
|
+
selection, dependency recovery, output handling, and final reporting, using the
|
|
241
|
+
current capture phase command returned by `context status`.
|
|
242
|
+
|
|
243
|
+
### Step 2 — Handle Monorepos
|
|
244
|
+
|
|
245
|
+
If a registered source may contain multiple packages, run:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
context source inspect <source-name> --format json
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Present the detected module/package paths from that CLI output as a tree. Explain
|
|
252
|
+
the choices without exposing internal API names first:
|
|
253
|
+
|
|
254
|
+
- for the current executable flow, register one package/subdirectory as its
|
|
255
|
+
own source when the user wants a focused package manual;
|
|
256
|
+
- if the user is designing a unified subspace knowledge base, keep the
|
|
257
|
+
parent source name as the namespace decision, but do not run extraction until
|
|
258
|
+
the concrete module extraction boundary is confirmed.
|
|
259
|
+
|
|
260
|
+
Wait for the user to choose. If the user chooses `packages/button`, register it
|
|
261
|
+
as a separate source such as:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
context source add repo button --local <repo>/packages/button
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Do not model a monorepo package choice as `include: ["packages/button/src/**"]`
|
|
268
|
+
on the parent source.
|
|
269
|
+
|
|
270
|
+
### Step 3 — Review Captured Document Summary
|
|
271
|
+
|
|
272
|
+
When status is `captured-ready-to-investigate`, or after a capture phase
|
|
273
|
+
completes, do not immediately create draft pages or compile actions. Present
|
|
274
|
+
the capture summary first:
|
|
275
|
+
|
|
276
|
+
- document count;
|
|
277
|
+
- title tree, heading tree, or source span distribution from the CLI output;
|
|
278
|
+
- available reading budget and evidence views;
|
|
279
|
+
- snapshot path under `sources/file|lark/<source-name>/`;
|
|
280
|
+
- the fact that approved pages are planned through
|
|
281
|
+
`unapproved/structure.yaml` before compile;
|
|
282
|
+
- whether the source is local file/folder evidence or Lark/Feishu evidence.
|
|
283
|
+
|
|
284
|
+
Then explain the next semantic gate in user-facing terms:
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
The source body has been captured into a committed snapshot.
|
|
288
|
+
|
|
289
|
+
Next we investigate the material and propose a structure draft:
|
|
290
|
+
- which knowledge pages should exist;
|
|
291
|
+
- which source spans support each section;
|
|
292
|
+
- which relationships are supported by evidence;
|
|
293
|
+
- what remains unresolved or weak.
|
|
294
|
+
|
|
295
|
+
No approved Markdown is written at this point. Compile can start only after the
|
|
296
|
+
structure is validated and you confirm it.
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
If the user wants to influence the shape before the Agent drafts it, ask a
|
|
300
|
+
small semantic question with host-native multi-choice support when available:
|
|
301
|
+
|
|
302
|
+
- Continue material investigation and propose a structure draft.
|
|
303
|
+
- First add a reference structure or preference, such as expected domains,
|
|
304
|
+
page naming, or relationship focus.
|
|
305
|
+
- Narrow or correct the captured source before planning.
|
|
306
|
+
|
|
307
|
+
Do not use SDK factory names as user-facing option labels. If the user asks for
|
|
308
|
+
one page per source document, represent that as a degenerate structure draft
|
|
309
|
+
and still route through structure confirmation plus compile. Then follow
|
|
310
|
+
`../skill-prose-align/SKILL.md`.
|
|
311
|
+
|
|
312
|
+
### Step 4 — Declare Extract And Review
|
|
313
|
+
|
|
314
|
+
Read the SDK guide before editing:
|
|
315
|
+
|
|
316
|
+
```text
|
|
317
|
+
node_modules/@c4a/context/docs/guides/agent-dialogue.md
|
|
318
|
+
node_modules/@c4a/context/docs/guides/agent-guide.md
|
|
319
|
+
node_modules/@c4a/context/docs/reference/project-api.md
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Before editing, explain the proposed extraction in product terms. Use wording
|
|
323
|
+
like:
|
|
324
|
+
|
|
325
|
+
```text
|
|
326
|
+
The source is ready and resolves to one package/module.
|
|
327
|
+
|
|
328
|
+
Proposed extraction:
|
|
329
|
+
- read TypeScript/TSX files under `src/`;
|
|
330
|
+
- include exported symbols such as components, functions, types, and props;
|
|
331
|
+
- create draft candidates for human review;
|
|
332
|
+
- write no approved Markdown until the review payload is applied.
|
|
333
|
+
|
|
334
|
+
This skips files outside `src/` and non-exported/internal helpers. If you want
|
|
335
|
+
docs, tests, examples, or internal APIs included, say that before extraction.
|
|
336
|
+
|
|
337
|
+
I will first generate a preview without writing candidates. The preview will
|
|
338
|
+
show counts plus the planned `knowledge/` tree.
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Only after the user confirms this product-level scope, declare the chosen source
|
|
342
|
+
with `source("<name>")`, add the TypeScript extraction phase, and add the human
|
|
343
|
+
review phase. Use `include` only for a file-level filter within the chosen
|
|
344
|
+
source boundary. Mention the internal API names only in code-change summaries,
|
|
345
|
+
or when the user asks for implementation details.
|
|
346
|
+
|
|
347
|
+
### Step 5 — Show The Pre-extraction Preview
|
|
348
|
+
|
|
349
|
+
Before real extraction, run the CLI no-write preview:
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
context run <extract-phase-id> --dry-run --format json
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Show the user:
|
|
356
|
+
|
|
357
|
+
- resolved source and module/package list;
|
|
358
|
+
- file, symbol, and candidate estimate counts;
|
|
359
|
+
- `knowledgeTree`;
|
|
360
|
+
- several `knowledgePathExamples`.
|
|
361
|
+
|
|
362
|
+
Explain that approved pages will land under paths derived from collection,
|
|
363
|
+
containment, and slug; NodeRef/ViewRef are identity fields, not path strings:
|
|
364
|
+
|
|
365
|
+
```text
|
|
366
|
+
knowledge/<collection>/<containment>/<slug>.md
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
If source name, package name, module list, candidate estimate, or path shape is
|
|
370
|
+
not what the user expects, stop and repair the source boundary or source name
|
|
371
|
+
before extraction.
|
|
372
|
+
|
|
373
|
+
For a single-module code source, a repeated path like
|
|
374
|
+
`knowledge/codegraph/<source-name>/<package-name>/...` is usually a schema
|
|
375
|
+
problem or a wrong source boundary. Stop before extraction if the preview shows
|
|
376
|
+
that shape unexpectedly.
|
|
377
|
+
|
|
378
|
+
Do not present this as a CLI option or as "Context default options" to the
|
|
379
|
+
user. Present it as the actual proposed knowledge impact: code area read,
|
|
380
|
+
exported-symbol policy, candidate count, and final path shape. The user-facing
|
|
381
|
+
phrase is "preview without writing".
|
|
382
|
+
|
|
383
|
+
### Step 6 — Run Extraction Only After Scope Is Clear
|
|
384
|
+
|
|
385
|
+
If the user already confirmed the exact source/scope and the no-write preview
|
|
386
|
+
matches it, run:
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
context run <extract-phase-id>
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
If the preview reports modules outside the confirmed source boundary, do not
|
|
393
|
+
run extraction. Ask the user to choose the corrected source boundary.
|
|
394
|
+
|
|
395
|
+
### Step 7 — Self-verify Checklist
|
|
396
|
+
|
|
397
|
+
- [ ] Source choice came from the user, not inference. If not, return to
|
|
398
|
+
**Step 1**.
|
|
399
|
+
- [ ] Monorepo package selection is represented as source boundary. If not,
|
|
400
|
+
return to **Step 2**.
|
|
401
|
+
- [ ] Captured document summary was shown before structure/compile. If not, return to
|
|
402
|
+
**Step 3**.
|
|
403
|
+
- [ ] No-write tree/path preview was shown before first real extraction. If not,
|
|
404
|
+
return to **Step 5**.
|
|
405
|
+
|
|
406
|
+
</procedures>
|
|
@@ -0,0 +1,180 @@
|
|
|
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 <name> --local <path>`
|
|
17
|
+
followed by `context run capture:file:<name> --format json`;
|
|
18
|
+
- Lark/Feishu source: `context source add lark <name> ...` followed by
|
|
19
|
+
`context run capture:lark:<name> --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
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Workflow
|
|
28
|
+
|
|
29
|
+
Capture is entirely CLI-driven — your role is to register the right source,
|
|
30
|
+
declare the matching capture phase, run the current `context run capture:*`
|
|
31
|
+
command, and relay its output. Never hand-write captured source snapshots: the
|
|
32
|
+
CLI owns normalisation (NFC, BOM strip, line endings) and the `content_hash`
|
|
33
|
+
contract, so any manual edit breaks idempotency.
|
|
34
|
+
|
|
35
|
+
### Code capture diagnostics
|
|
36
|
+
|
|
37
|
+
Do not run hand-written dependency preflight commands before code extraction or
|
|
38
|
+
document capture. The CLI owns configured runner/plugin resolution and returns
|
|
39
|
+
structured `agent_hints[]` when a runner or remote-document helper is missing or
|
|
40
|
+
misconfigured.
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
Invocation note: document capture and code extraction do not run through `npx`.
|
|
45
|
+
Use the installed `context` CLI and the declared phase command returned by
|
|
46
|
+
`context status` or the phase view. When external helpers are missing, surface
|
|
47
|
+
the CLI's structured install hints instead of substituting your own package
|
|
48
|
+
manager or version.
|
|
49
|
+
|
|
50
|
+
### Route by source boundary
|
|
51
|
+
|
|
52
|
+
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.
|
|
53
|
+
|
|
54
|
+
- One or more local `.md` / `.mdx` files or a local documentation folder to ingest →
|
|
55
|
+
register one file source with the user-confirmed source name and boundary:
|
|
56
|
+
`context source add file <name> --local <file-or-folder>`. For an explicit
|
|
57
|
+
batch inside a broader folder, preserve the user's include list on source
|
|
58
|
+
registration. Default file capture handles `.md`. If the CLI reports
|
|
59
|
+
document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
|
|
60
|
+
stop and confirm whether the selected boundary is a documentation site before
|
|
61
|
+
changing capture configuration. For MDX documentation sites that use
|
|
62
|
+
`_meta.json`, declare `mdxJsonDocs()` on `captureFile` in `src/index.ts`;
|
|
63
|
+
keep `_meta.json` only when it is route metadata for the selected document
|
|
64
|
+
folder. The CLI captures it as metadata and generates
|
|
65
|
+
`__context_route_metadata.md` as mechanical route evidence; it also extracts
|
|
66
|
+
static MDX component props/children into `__context_mdx_component_text.md`
|
|
67
|
+
when components carry user-facing text. Declare
|
|
68
|
+
`captureFile({ source: source("<name>"), processor: mdxJsonDocs() })`, then
|
|
69
|
+
run `context run capture:file:<name> --format json`. If the selected MDX page
|
|
70
|
+
is empty or only mounts runtime-rendered content, tell the user that capture
|
|
71
|
+
found a document-site shell and ask for the rendered-site or data-source
|
|
72
|
+
boundary instead of inventing body text.
|
|
73
|
+
- A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
|
|
74
|
+
`context source add lark <name> --url <url>` or the matching token flag.
|
|
75
|
+
Declare `captureLark({ source: source("<name>") })`, then run
|
|
76
|
+
`context run capture:lark:<name> --format json`.
|
|
77
|
+
- Mixed local document and Lark document batches are separate sources unless
|
|
78
|
+
the current CLI explicitly offers a combined source contract. Do not write an
|
|
79
|
+
Agent-side URL/file loop.
|
|
80
|
+
- Refresh or recapture request for an already registered file/Lark source →
|
|
81
|
+
rerun the same declared capture phase. The CLI appends a new snapshot only
|
|
82
|
+
when content changes and never overwrites prior snapshots.
|
|
83
|
+
- Code package extraction is not document capture. Route code source selection
|
|
84
|
+
through `skill-source-scope` extraction preview and the declared extract
|
|
85
|
+
phase. Do not invent a document capture path for code.
|
|
86
|
+
- Conversation notes, decisions, and revision intents are not document capture
|
|
87
|
+
sources in the current workflow unless the CLI status or project-specific
|
|
88
|
+
phase exposes an explicit note source contract. If absent, record the user
|
|
89
|
+
guidance in the conversation and use it as pre-align hints, not as a snapshot
|
|
90
|
+
write.
|
|
91
|
+
|
|
92
|
+
Do not discover files with `find` / `ls` when the user already supplied paths.
|
|
93
|
+
If the include set is large, summarize it and ask for confirmation before
|
|
94
|
+
registration; do not read file bodies before capture permission is clear.
|
|
95
|
+
|
|
96
|
+
### Output Handling
|
|
97
|
+
|
|
98
|
+
Report the CLI output verbatim. If the CLI reports `N sources changed`, suggest the right next step:
|
|
99
|
+
|
|
100
|
+
- Run `context status --format json` and use its `state`, `routing`, and
|
|
101
|
+
`next_commands`.
|
|
102
|
+
- If status reports `captured-ready-to-investigate`, suggest the returned
|
|
103
|
+
`context run align:<type>:<source>:<collection> --view read-plan --format json`
|
|
104
|
+
command and hand off to `skill-prose-align`.
|
|
105
|
+
- If status reports `needs-structure` or `structure-ready`, follow the returned
|
|
106
|
+
align/compile command instead of naming a generic slash command.
|
|
107
|
+
- If status reports `compile-ready-for-review`, route to the review gate.
|
|
108
|
+
- If the source was code-only and status reports pending code projection,
|
|
109
|
+
follow the CLI-owned extract/compile route returned by status.
|
|
110
|
+
|
|
111
|
+
Never suggest prose compile or hand-built document knowledge for a code-only
|
|
112
|
+
source. Code sources become active knowledge only through the declared
|
|
113
|
+
extraction/review route returned by `context status`.
|
|
114
|
+
|
|
115
|
+
If capture is rejected because another phase or write gate is active, do not
|
|
116
|
+
discard it automatically. Explain the active state from `context status`, follow
|
|
117
|
+
that phase when it is the intended task, and ask the user before discarding
|
|
118
|
+
in-progress work when a current project command exists. If the user expected a
|
|
119
|
+
different repository/workspace, change to the confirmed workspace root before
|
|
120
|
+
retrying capture.
|
|
121
|
+
|
|
122
|
+
## Final Report
|
|
123
|
+
|
|
124
|
+
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.
|
|
125
|
+
|
|
126
|
+
Stable structure:
|
|
127
|
+
|
|
128
|
+
1. Completion headline. Single line with the action verb plus core counts: how
|
|
129
|
+
many sources were captured this round, broken down by `new` / `updated` /
|
|
130
|
+
`unchanged`. Capture data from the current `context run capture:* --format
|
|
131
|
+
json` result summary, or per-source statuses when no aggregate is returned.
|
|
132
|
+
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.
|
|
133
|
+
3. Pending phase signals. When `context status --format json` reports follow-up
|
|
134
|
+
work tied to this capture (sources pending align, sources pending compile,
|
|
135
|
+
refreshed sources pending recompile, code sources pending projection),
|
|
136
|
+
summarize each as a single line naming the work and which sources are
|
|
137
|
+
affected. Omit the section entirely when there is no pending follow-up.
|
|
138
|
+
4. Next step. Single command suggestion driven by status: the returned
|
|
139
|
+
`context run align:<type>:<source>:<collection> ...` command when structure work is
|
|
140
|
+
pending, the returned `context run compile:<type>:<source>:<collection> ...`
|
|
141
|
+
command when prose compile work is pending, or the CLI-owned code projection
|
|
142
|
+
command when code projection is pending. If nothing is pending, say so
|
|
143
|
+
explicitly.
|
|
144
|
+
|
|
145
|
+
Do not include raw CLI diagnostics, agent_hints content, schema names, or phase
|
|
146
|
+
payload identifiers in the report. Those belong in earlier troubleshooting
|
|
147
|
+
output, not in the completion summary.
|
|
148
|
+
|
|
149
|
+
## Reference
|
|
150
|
+
|
|
151
|
+
### Missing Dependency Recovery
|
|
152
|
+
|
|
153
|
+
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.
|
|
154
|
+
|
|
155
|
+
If the CLI prints a missing-dependency error like `lark-cli not installed`, walk the user through installation:
|
|
156
|
+
|
|
157
|
+
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.
|
|
158
|
+
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`).
|
|
159
|
+
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.
|
|
160
|
+
4. Stop on any failure; surface stderr verbatim.
|
|
161
|
+
5. After success, tell the user to rerun the current Context command that
|
|
162
|
+
failed.
|
|
163
|
+
|
|
164
|
+
### Language Policy
|
|
165
|
+
|
|
166
|
+
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.
|
|
167
|
+
|
|
168
|
+
### Invariants
|
|
169
|
+
|
|
170
|
+
- Captured source snapshots are immutable post-write — the CLI only ever appends new snapshots.
|
|
171
|
+
- The source registry is authoritative; derived index files are not Agent phase
|
|
172
|
+
inputs.
|
|
173
|
+
- 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.
|
|
174
|
+
- 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.
|
|
175
|
+
- 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.
|
|
176
|
+
- 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.
|
|
177
|
+
- Code extraction/projection is separate from document capture. Materialize code
|
|
178
|
+
knowledge through the declared extract/code projection flow before prose align
|
|
179
|
+
attaches documentation to code Nodes.
|
|
180
|
+
- On duplicate capture of the same URL: identical `content_hash` → CLI skips with `unchanged`; different hash → CLI appends a new snapshot.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-continue
|
|
3
|
+
description: >
|
|
4
|
+
Inspect the Context workspace, decide the next useful action, and proceed. Use the local `context` CLI for workspace writes.
|
|
5
|
+
tools:
|
|
6
|
+
- Bash
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Continue
|
|
10
|
+
|
|
11
|
+
Public Context entry for agents that expose skills instead of slash commands.
|
|
12
|
+
|
|
13
|
+
- Public entry: `context-continue`
|
|
14
|
+
- Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
|
|
15
|
+
- CLI primitive prefix: `context ...`
|
|
16
|
+
- Internal procedures live under `references/internal-procedures/`; read each referenced file in full before following that step.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
Use this as the conversational entry for an existing Context workspace. There is
|
|
23
|
+
no `context continue` CLI primitive; the command runs lower-level `context ...`
|
|
24
|
+
commands only when the workspace state requires them.
|
|
25
|
+
|
|
26
|
+
If the user is starting a new workspace or a new batch from a raw repository
|
|
27
|
+
root, do not run `context status` first. Use the public Context init entry or
|
|
28
|
+
`context init` to create the workspace, complete the init setup command, then
|
|
29
|
+
return here from the initialized workspace.
|
|
30
|
+
|
|
31
|
+
If `context status` reports `workspace-not-found` and points at a configured
|
|
32
|
+
`context.workspaceDir`, do not keep working from the host repository root. Enter
|
|
33
|
+
that workspace when it exists, or initialize it through the init workflow after
|
|
34
|
+
confirming with the user.
|
|
35
|
+
|
|
36
|
+
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
37
|
+
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
38
|
+
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
39
|
+
|
|
40
|
+
Use the procedure in `references/internal-procedures/skill-continue-workflow.md` end to end. It owns the
|
|
41
|
+
status loop, safe mechanical next steps, source/scope gate, review gate, package
|
|
42
|
+
gate, and final report rules.
|
|
43
|
+
|
|
44
|
+
Do not infer repo sources, extraction scope, review decisions, or package output
|
|
45
|
+
choices from surrounding files. Do not call source-repo operations such as
|
|
46
|
+
clone, checkout, reset, fetch, install, build, or test without explicit user
|
|
47
|
+
approval.
|