@c4a/context-cli 0.5.41-beta.6 → 0.6.0-alpha.1
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 +51018 -96457
- 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 -85
- package/plugin/README_CN.md +92 -84
- 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 +402 -0
- package/plugin/skills/skill-source-scope/references/capture-source.md +171 -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 +402 -0
- package/plugins/claude/skills/skill-source-scope/references/capture-source.md +171 -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 +171 -0
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +402 -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 +171 -0
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +402 -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 +402 -0
- package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +171 -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 +171 -0
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +402 -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 +171 -0
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +402 -0
- package/scripts/build-plugin.ts +70 -126
- package/plugin/commands/align.md +0 -71
- package/plugin/commands/capture.md +0 -113
- package/plugin/commands/compile.md +0 -103
- package/plugin/commands/context.md +0 -35
- package/plugin/commands/drop.md +0 -38
- package/plugin/commands/extract.md +0 -18
- 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 -233
- 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
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-drop
|
|
3
|
-
description: >
|
|
4
|
-
Packaged skill invoked by `/context:drop`; not a user slash command. Source retraction through CLI-owned planning and application. The agent
|
|
5
|
-
calls `context drop --plan` for a structured impact plan, presents the
|
|
6
|
-
user-facing summary for confirmation, runs semantic reconciliation when the
|
|
7
|
-
plan archives affected Sections, then calls `context drop --apply-plan` so
|
|
8
|
-
the CLI archives raw and removed knowledge, cleans active knowledge, applies
|
|
9
|
-
source alias reindexing, source stamp, changelog append, consumes the current
|
|
10
|
-
ready immutable review when semantic decisions are required, writes the
|
|
11
|
-
semantic ledger, and runs verify.
|
|
12
|
-
Activates when `/context:drop` is invoked with a source-id or URL.
|
|
13
|
-
tools:
|
|
14
|
-
- Bash
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# skill-drop — retract a source without losing the audit trail
|
|
18
|
-
|
|
19
|
-
Ask the CLI for a structured cleanup plan, confirm the user-visible impact,
|
|
20
|
-
run semantic reconciliation on affected knowledge items when required, then ask
|
|
21
|
-
the CLI to apply the plan. Do not inspect or mutate workspace files directly.
|
|
22
|
-
|
|
23
|
-
## TL;DR — Non-negotiables
|
|
24
|
-
|
|
25
|
-
- Plan + semantic prepare/review + apply are CLI-owned. The agent only presents the plan, asks semantic questions when required, and waits for confirmation.
|
|
26
|
-
- Drop removes affected raw / unsupported knowledge from the active workspace and keeps a CLI-managed restorable archive for audit.
|
|
27
|
-
- Do not Read / Glob / Grep / Write workspace storage; all impact analysis and mutation must go through `context drop --plan`, `context reconcile prepare --mode drop`, `context reconcile review`, and `context drop --apply-plan`.
|
|
28
|
-
- Do not use Python, Node.js, shell scripts, `ls`, `find`, `rg`, `cat`, or similar ad-hoc commands to inspect or preprocess workspace storage or temporary workflow artifacts.
|
|
29
|
-
- `context drop --plan <source-id|url> --format json` resolves source-id, computes affected topics / knowledge items, reports alias reindex impact, and stores the exact plan as the current workflow's `drop-plan` payload. `--save-output` is only for an explicit human-readable scratch copy; do not use it as a handoff.
|
|
30
|
-
- `context drop --apply-plan --reason "<text>" --yes` reads the current workflow `drop-plan` payload, archives affected active content, consumes the current workflow's ready immutable review when the plan archives Sections, removes unsupported Sections / empty Nodes from active knowledge, applies source alias reindexing, writes the source stamp, changelog append, semantic ledger when decisions exist, and verify. Do not pass plan or decisions files to drop apply.
|
|
31
|
-
- User confirmation required unless `--yes` was passed; abort on any non-`y` answer without writing. `--yes` does not skip semantic `ask_user` questions.
|
|
32
|
-
- Confirmation prose describes affected topics and claims, not source-ref mechanics.
|
|
33
|
-
- Source evidence, section, and verify rule meanings stay anchored to the CLI plan, reconcile, and verify outputs.
|
|
34
|
-
- Output language: impact plan + report match the user's language; CLI commands, flag names, source-ids, comment attributes stay English.
|
|
35
|
-
|
|
36
|
-
<reference>
|
|
37
|
-
|
|
38
|
-
## Plan fields
|
|
39
|
-
|
|
40
|
-
The JSON plan has:
|
|
41
|
-
|
|
42
|
-
| Field | Meaning |
|
|
43
|
-
|---|---|
|
|
44
|
-
| `source_id` | Canonical source id resolved from user input |
|
|
45
|
-
| `resolved_from.kind` | `source-id` or `url` for the production Agent flow |
|
|
46
|
-
| `affected_nodes[]` | Topics whose source list contains the dropped source |
|
|
47
|
-
| `affected_nodes[].sections[]` | Knowledge items that require semantic reconciliation before the source is dropped |
|
|
48
|
-
| `affected_nodes[].reindex_sections[]` | Knowledge items whose internal source alias will be renumbered after the source is removed |
|
|
49
|
-
| `affected_nodes[].will_be_sourceless` | Topic has no remaining source ids after cleanup |
|
|
50
|
-
| `affected_nodes[].will_be_empty` | Topic has no remaining Section/body/children/contains after cleanup and may be archived even if another source id remains |
|
|
51
|
-
| `affected_graph_edges[]` | Explicit graph edges that will be removed if one endpoint is archived by apply |
|
|
52
|
-
| `references_will_be_pruned[]` | Surviving Sections whose `refers_to_nodes[]` will lose archived node slugs; the Section itself is not removed |
|
|
53
|
-
| `summary` | Counts for confirmation and changelog |
|
|
54
|
-
|
|
55
|
-
If a non-domain Node would keep an active source id but lose all of its own Sections while still carrying child Nodes, contains links, or body text, do not rely on verify to catch it after mutation. Produce a semantic reanchor/split decision that preserves a supported Section, or expect `drop --apply-plan` to reject before writing.
|
|
56
|
-
|
|
57
|
-
## User-facing impact summary shape
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
Affected: N topics · M knowledge items
|
|
61
|
-
|
|
62
|
-
<topic title>
|
|
63
|
-
"short claim preview" → remove from active knowledge and archive
|
|
64
|
-
"short claim preview" → keep, supported by another source document
|
|
65
|
-
<topic title>
|
|
66
|
-
"short claim preview" → remove from active knowledge and archive
|
|
67
|
-
|
|
68
|
-
Proceed? [y/N]
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Keep the internal node slug, Section id, and source-ref patch data in your
|
|
72
|
-
working notes for Step 4; show them only if the user asks for implementation
|
|
73
|
-
details.
|
|
74
|
-
|
|
75
|
-
## CLI shapes
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
context drop --plan <source-id|url> --format json
|
|
79
|
-
context reconcile prepare --mode drop --format json
|
|
80
|
-
context reconcile review --decisions - --view status
|
|
81
|
-
context drop --apply-plan --reason "<text>" --yes
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
The apply command writes a source-specific restorable archive,
|
|
85
|
-
moves affected raw out of the active source set, consumes the current workflow's ready immutable review for
|
|
86
|
-
reanchor / remove_unsupported / split_then_reanchor when affected Sections are archived, removes unsupported
|
|
87
|
-
Sections / empty Nodes from active knowledge, flips the source registry entry to
|
|
88
|
-
`status: dropped`, stamps `drop_reason`, `dropped_at`, and a semantic archive status,
|
|
89
|
-
appends a `[drop]` changelog line, records the semantic ledger when decisions exist,
|
|
90
|
-
and runs verify. It exits
|
|
91
|
-
non-zero if the source-id is unknown, already dropped, plan shape is invalid,
|
|
92
|
-
the plan is stale, semantic decisions are unresolved/invalid, or verify reports errors.
|
|
93
|
-
In drop mode, `remove_unsupported` means physical removal from active knowledge
|
|
94
|
-
after the archive captures the before snapshot; compile/refresh apply uses the
|
|
95
|
-
same action name for Section deprecation.
|
|
96
|
-
|
|
97
|
-
</reference>
|
|
98
|
-
|
|
99
|
-
<procedures>
|
|
100
|
-
|
|
101
|
-
### Step 1 — Parse arguments
|
|
102
|
-
|
|
103
|
-
From `$ARGUMENTS`: `<source-id|url>` (required), `--reason <text>` (optional), `--yes` (optional). If the target is missing, stop and ask for the source id or URL. If the reason is missing but the user's wording gives a clear reason, infer a concise reason such as `用户主动撤回`; otherwise collect it before Step 4.
|
|
104
|
-
|
|
105
|
-
### Step 2 — Ask CLI for a plan
|
|
106
|
-
|
|
107
|
-
Run `context drop --plan <source-id|url> --format json`.
|
|
108
|
-
The CLI stores the plan in the current workflow and prints the plan JSON for
|
|
109
|
-
the impact summary. Use `--save-output` only when the user explicitly wants a
|
|
110
|
-
readable copy; it is not a workflow input.
|
|
111
|
-
Do not inspect workspace files yourself. If the CLI reports source-not-found or
|
|
112
|
-
source-already-dropped, relay the error and stop.
|
|
113
|
-
|
|
114
|
-
### Step 3 — Present the impact plan
|
|
115
|
-
|
|
116
|
-
Render the [User-facing impact summary shape](#user-facing-impact-summary-shape)
|
|
117
|
-
from the plan JSON in the user's language. Make clear that dropping a source
|
|
118
|
-
removes listed content from active knowledge but keeps it restorable until
|
|
119
|
-
`context purge`. Mention conditional graph edge cleanup when
|
|
120
|
-
`affected_graph_edges[]` is non-empty; these edges are removed only if the
|
|
121
|
-
endpoint leaves active knowledge after reconciliation. Include the reason that will be stamped; if
|
|
122
|
-
it is still unknown, ask for the reason before continuing. If `--yes`, log
|
|
123
|
-
"auto-confirmed per --yes" and continue. Otherwise wait for `y`; abort on
|
|
124
|
-
anything else without writing.
|
|
125
|
-
|
|
126
|
-
### Step 4 — Reconcile affected knowledge
|
|
127
|
-
|
|
128
|
-
If the plan summary has `archive_sections: 0`, skip semantic reconcile and continue to Step 5. The apply path is review-free only for this no-op archive case.
|
|
129
|
-
|
|
130
|
-
Use the current workflow plan created by Step 2. Do not pass a plan file. Then run:
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
context reconcile prepare --mode drop --format json
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Invoke the packaged semantic reconcile procedure with that prepare payload. Use
|
|
137
|
-
Pass the semantic reconcile decision document directly to review, preferably
|
|
138
|
-
through stdin:
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
context reconcile review --decisions - --view status
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
The review command persists the ready immutable review artifact for the current
|
|
145
|
-
drop workflow scope when `ready_to_apply: true`. Do not extract
|
|
146
|
-
`apply_document`, and do not pass the decisions file to drop apply.
|
|
147
|
-
If review returns any `questions[]`, ask the user and convert those decisions
|
|
148
|
-
from `ask_user` into one of `reanchor`, `remove_unsupported`, or
|
|
149
|
-
`split_then_reanchor` before continuing. Do not let `--yes` bypass this step.
|
|
150
|
-
Weak evidence support is not a drop safety bypass: `reanchor` and
|
|
151
|
-
`split_then_reanchor` still need clearly supported surviving evidence. If
|
|
152
|
-
review cannot confirm that support, choose `remove_unsupported` or stop for
|
|
153
|
-
user input instead of forcing a weak reanchor.
|
|
154
|
-
|
|
155
|
-
### Step 5 — Apply the plan
|
|
156
|
-
|
|
157
|
-
Use the current workflow plan from Step 2. If Step 4 ran semantic review, make
|
|
158
|
-
sure the latest `context reconcile review` result returned `ready_to_apply:
|
|
159
|
-
true`; the CLI will load that ready review artifact itself. Then call:
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
context drop --apply-plan --reason "<text>" --yes
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Do not call `context mdrive section ...` or `context mdrive node ...` for the
|
|
166
|
-
standard drop flow; `drop --apply-plan` owns cleanup, ledger write when
|
|
167
|
-
decisions exist, and verify. If the CLI rejects for missing ready review, rerun
|
|
168
|
-
Step 4 and then retry apply without changing the apply command shape.
|
|
169
|
-
|
|
170
|
-
### Step 6 — Report
|
|
171
|
-
|
|
172
|
-
The apply command already verifies. Run `context source get <source-id>` and
|
|
173
|
-
report in the user's language: topics affected, knowledge items marked
|
|
174
|
-
archived/removed from active knowledge, source alias reindex count, archive
|
|
175
|
-
status, changelog timestamp.
|
|
176
|
-
|
|
177
|
-
### Step 7 — Self-verify
|
|
178
|
-
|
|
179
|
-
- [ ] No Read / Glob / Grep / Write was used against workspace storage — if any was used, restart from **Step 2** with CLI-only flow.
|
|
180
|
-
- [ ] No ad-hoc script or shell file traversal was used against workspace storage or temporary workflow artifacts — if any was used, restart from **Step 2** with CLI-only flow.
|
|
181
|
-
- [ ] `context drop --plan` succeeded before asking the user — if not, **Step 2**.
|
|
182
|
-
- [ ] `context reconcile prepare --mode drop` read the current workflow drop-plan payload — if not, **Step 2**.
|
|
183
|
-
- [ ] `context reconcile review` returned zero `questions[]` before apply; if any question remains, ask the user and regenerate the decisions document.
|
|
184
|
-
- [ ] User confirmed unless `--yes` was passed — if not, abort without writing.
|
|
185
|
-
- [ ] `context drop --apply-plan` exited 0 — if not, surface the CLI error and stop.
|
|
186
|
-
- [ ] `context source get <source-id>` shows the source as dropped — if not, surface the mismatch.
|
|
187
|
-
- [ ] The reported source entry includes semantic archive status when the source was archived — if missing, surface the mismatch.
|
|
188
|
-
|
|
189
|
-
</procedures>
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-semantic-reconcile
|
|
3
|
-
description: >
|
|
4
|
-
Packaged skill used by `/context:drop`, refresh/non-compile reconcile flows,
|
|
5
|
-
and compile scope-review fallback; not a user slash command. Ordinary compile
|
|
6
|
-
prepare judgment uses `skill-compile-judge`. This skill consumes only
|
|
7
|
-
`context reconcile prepare` output, judges semantic relation/action for each item,
|
|
8
|
-
and emits a `semantic-decisions.v2` decision document for `context reconcile review`;
|
|
9
|
-
apply consumes the current workflow's ready review artifact.
|
|
10
|
-
tools:
|
|
11
|
-
- Bash
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# skill-semantic-reconcile — decide Section reconciliation
|
|
15
|
-
|
|
16
|
-
Judge duplicate, merge, conflict, reanchor, and unsupported cases for refresh,
|
|
17
|
-
drop, non-compile reconcile, or compile scope-review fallback. Emit decisions
|
|
18
|
-
only; the CLI performs every write.
|
|
19
|
-
|
|
20
|
-
## TL;DR — Non-negotiables
|
|
21
|
-
|
|
22
|
-
- Input is the budget-safe `context reconcile prepare` summary or issues view. When an item lists candidates, load that item's candidate detail view with `context workflow show --payload prepare --view candidates --item-id <item-id> --unwrap --format json`; request broader detail only when a CLI `next_action` or detail command explicitly asks for it. Never `grep` / `sed` / `jq` / `cat` / `head` workflow scratch files or `--format json` stdout to recover prepare fields, and do not Read / Glob / Grep / Write workspace `raw/` / `knowledge/` / `archive/` / `decisions/` — the prepare payload and review output are the only inputs.
|
|
23
|
-
- Ordinary compile prepare judgment belongs to `skill-compile-judge`. Use this skill for refresh/drop/non-compile reconcile, or when compile review asks for scope/omit/user-confirmation reasoning that is outside the judge handoff.
|
|
24
|
-
- Output: one YAML or JSON document conforming to `context schema semantic-decisions --format yaml`. The schema defines canonical `relation` and `action` enums and the per-action required fields; do not memorise the enum list from this skill.
|
|
25
|
-
- Accept a prepared `default_decision` with the compact form `{ item_id, accept_default: true }` (optionally `decided_by` / `rationale`); the CLI hydrates `target` / `proposed`. Empty `decisions: []` means "no items in prepare," not "accept all defaults." Without `--accept-safe-defaults`, emit one compact accept entry per safe default you intend to accept. With `--accept-safe-defaults`, the CLI auto-accepts mechanically safe defaults: no-candidate writes, reviewed-no-write skips, and low-risk `keep_separate` relation candidates only when the active compile workflow was created with user-authorized `--delegated`. Emit only the manual decisions that still need judgment.
|
|
26
|
-
- Every `merge_update` / `supersede` / `keep_separate` / `split_then_reanchor` write must be supported by **one** valid `proposed.source_ref` covering the final content. Preserve raw evidence's domain terms, numbers, code literals, and named entities; do not introduce acronyms, translations, or aliases the cited evidence does not define. Do not cite a title, `Relations` / `Parent` / `Children` / `Related` navigation line as the sole support for a substantive claim.
|
|
27
|
-
- Unresolved conflicts and low-confidence support → `action: ask_user`. Never expose `src-N`, Section ids, or source refs as the user-facing choice; they belong only in the structured payload.
|
|
28
|
-
- `decided_by: user` only after a specific recent user message answering the specific question for the specific item. Auto mode, blanket "continue," and long-running permissions are **not** user confirmation. Never mark yourself.
|
|
29
|
-
- `decided_by: delegated_agent` is CLI-owned. Do not emit it manually; it appears only when the current compile workflow was created with user-authorized `--delegated`.
|
|
30
|
-
- `omit` is never an automatic decision. If an item looks redundant or low-value, follow the Scope Review pass in [references/scope-review-and-omit.md](references/scope-review-and-omit.md); only a user-confirmed no-write outcome may become `action: omit` with `decided_by: user`.
|
|
31
|
-
- `apply` consumes the ready review artifact for the current workflow scope: run plain `context reconcile apply`. There is no input file; do not extract `apply_document` with scripts.
|
|
32
|
-
- Stable output: preserve prepared item order; the CLI rejects unknown fields (timestamps, random ids, storage paths, host absolute paths) and canonicalises stored payloads. Fixed rules and schema come from this skill; only the prepared context varies between repeated review calls.
|
|
33
|
-
|
|
34
|
-
## Edge cases — consult references when:
|
|
35
|
-
|
|
36
|
-
| Condition | Reference |
|
|
37
|
-
|---|---|
|
|
38
|
-
| `prepare.mode` is `drop` or `refresh` (covers `remove_unsupported` mode semantics, `reanchor`, `split_then_reanchor`) | [references/mode-semantics.md](references/mode-semantics.md) |
|
|
39
|
-
| review returned `support_confirmation`, `omit_confirmation`, `scope_review_required`, or any `ask_user` you need to upgrade to an executable decision | [references/user-confirmation.md](references/user-confirmation.md) |
|
|
40
|
-
| review diagnostics or cutover hints returned `code: "context-only-leakage-high"` | [references/leakage-and-ownership.md](references/leakage-and-ownership.md) |
|
|
41
|
-
| items carry `temporal_prior` / `source_captured_at` / `temporal_disposition`, raw/source_ref boundary diagnostics, or prepared long `proposed.content` / `proposed.summary` | [references/temporal-and-evidence.md](references/temporal-and-evidence.md) |
|
|
42
|
-
| considering `action: omit`, or items look redundant / low-value / scope-wrong | [references/scope-review-and-omit.md](references/scope-review-and-omit.md) |
|
|
43
|
-
|
|
44
|
-
If none of the above hold, you are on this skill's main path: refresh/drop/non-compile reconcile, or compile scope-review fallback with no special review-time signals. Ordinary compile prepare relation/support judgment remains `skill-compile-judge`.
|
|
45
|
-
|
|
46
|
-
<reference>
|
|
47
|
-
|
|
48
|
-
## Decision Shape
|
|
49
|
-
|
|
50
|
-
Accept a prepared `default_decision` with the compact form:
|
|
51
|
-
|
|
52
|
-
```yaml
|
|
53
|
-
schema_version: "semantic-decisions.v2"
|
|
54
|
-
decisions:
|
|
55
|
-
- item_id: claim-001
|
|
56
|
-
accept_default: true
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
For a changed action or hand-authored decision, emit the full shape with the action's required fields (see Action Rules below):
|
|
60
|
-
|
|
61
|
-
```yaml
|
|
62
|
-
schema_version: "semantic-decisions.v2"
|
|
63
|
-
decisions:
|
|
64
|
-
- item_id: claim-001
|
|
65
|
-
relation: near_duplicate
|
|
66
|
-
action: merge_update
|
|
67
|
-
target:
|
|
68
|
-
node: payment-runtime
|
|
69
|
-
section_id: section-3
|
|
70
|
-
proposed:
|
|
71
|
-
content: "Runtime isolation uses sandboxing to avoid state pollution."
|
|
72
|
-
confidence: confirmed
|
|
73
|
-
source_ref: "src-2#runtime L12-14@7a6f4c9d2e10"
|
|
74
|
-
rationale: "The new evidence clarifies the same claim."
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
`decided_by` is a top-level decision field, not a `proposed` sub-field. Final executable decisions must not carry `user_confirmation.required: true` — that flag belongs only on `action: ask_user` items still awaiting input.
|
|
78
|
-
|
|
79
|
-
## Action Rules — main path
|
|
80
|
-
|
|
81
|
-
Edge-case actions (`reanchor`, `split_then_reanchor`, `remove_unsupported`, `omit`) and their required fields live in the matching reference; consult them when triggered.
|
|
82
|
-
|
|
83
|
-
| action | Required fields | Validation |
|
|
84
|
-
|---|---|---|
|
|
85
|
-
| `duplicate_skip` | `target` | Exact duplicate or already-applied no-op only. |
|
|
86
|
-
| `merge_update` | `target`, `proposed.content`, `proposed.source_ref`, `proposed.summary` when present in prepare | Final content must be supported by cited evidence; `proposed.kind`, when present, must match target kind. |
|
|
87
|
-
| `supersede` | `target`, `proposed.kind`, `proposed.content`, `proposed.source_ref`, `proposed.summary` when present in prepare | New Section claim must be supported by cited evidence. |
|
|
88
|
-
| `keep_separate` | `target`, `proposed.kind`, `proposed.content`, `proposed.source_ref`, `proposed.summary` when present in prepare | New orthogonal claim must be supported by cited evidence. Weak support is allowed only after explicit user confirmation (`decided_by: user`). |
|
|
89
|
-
| `ask_user` | `user_confirmation.required: true` | Use when business meaning or support cannot be decided from prepared evidence. |
|
|
90
|
-
|
|
91
|
-
Evidence boundary gate: if the proposed claim cannot honestly point at one range covering every sentence, split the claim or ask the user instead of forcing it into an incorrect `source_ref`. If a useful reader summary would combine adjacent evidence, first broaden `proposed.source_ref` so the cited range covers every sentence; if that broadening would require unrelated content, split. See [references/temporal-and-evidence.md](references/temporal-and-evidence.md) for evidence boundary repair hints.
|
|
92
|
-
|
|
93
|
-
</reference>
|
|
94
|
-
|
|
95
|
-
<procedures>
|
|
96
|
-
|
|
97
|
-
### Step 1 — Consume Prepared Context
|
|
98
|
-
|
|
99
|
-
Use the caller-provided `context reconcile prepare` payload. For each item, compare `proposed`, `candidates`, `previous_decisions`, and `evidence`.
|
|
100
|
-
|
|
101
|
-
If `prepare.mode` is `drop` or `refresh`, or any item carries the special signals listed in the routing table above, read the relevant reference **before** classifying — those references explain how the corresponding conditions modify Step 2.
|
|
102
|
-
|
|
103
|
-
If prepare returns `items: []`, no decision is needed; the caller may skip review/apply or pass `decisions: []` as an explicit no-op.
|
|
104
|
-
|
|
105
|
-
If `previous_decisions[]` shows the same boundary and the prepared item still matches, emit the same final action. If the target changed, treat the previous decision as a prior only and continue judging.
|
|
106
|
-
|
|
107
|
-
### Step 2 — Decide Relation And Action
|
|
108
|
-
|
|
109
|
-
Classify each item against the prepared evidence:
|
|
110
|
-
|
|
111
|
-
- Exact same claim already active → `exact_duplicate` + `duplicate_skip`.
|
|
112
|
-
- Same claim with a raw-supported correction or refinement from one supporting source → `strong_equivalent` or `near_duplicate` + `merge_update`.
|
|
113
|
-
- Additional but separate boundary → `complement` + `keep_separate`.
|
|
114
|
-
- New material replaces old rule → `supersedes` + `supersede`.
|
|
115
|
-
- Direct contradiction → `conflicts` + `ask_user`.
|
|
116
|
-
- Evidence is close but not enough → `ask_user`; for `keep_separate`, review may turn this into `support_confirmation` (see [references/user-confirmation.md](references/user-confirmation.md)).
|
|
117
|
-
- Item appears redundant or not worth writing → run the Scope Review pass in [references/scope-review-and-omit.md](references/scope-review-and-omit.md); never auto-`omit`.
|
|
118
|
-
|
|
119
|
-
Drop-mode-only branches (`reanchor`, `split_then_reanchor`, `remove_unsupported`) live in [references/mode-semantics.md](references/mode-semantics.md).
|
|
120
|
-
|
|
121
|
-
### Step 3 — Emit Decisions
|
|
122
|
-
|
|
123
|
-
Emit one document with `schema_version: "semantic-decisions.v2"` and `decisions[]`. Include only executable final decisions plus unresolved `ask_user` questions. Do not include prose outside the document.
|
|
124
|
-
|
|
125
|
-
If the latest review rejected the batch with `context-only-leakage-high`, do not convert it into a generic `ask_user`. Follow [references/leakage-and-ownership.md](references/leakage-and-ownership.md): regenerate the affected decision using the review diagnostic's explicit repair options and cited item ids, then rerun `context reconcile review`.
|
|
126
|
-
|
|
127
|
-
### Step 4 — Self-verify
|
|
128
|
-
|
|
129
|
-
- [ ] Every decision uses canonical `relation` / `action` values per `context schema semantic-decisions`. If not, return to **Step 2**.
|
|
130
|
-
- [ ] Every write action carries the required fields from Action Rules (or, for edge-case actions, the rules in the matching reference). If not, **Step 3**.
|
|
131
|
-
- [ ] `decided_by: user` corresponds to a specific recent user message answering this specific question for this specific item. If not, downgrade to `ask_user`.
|
|
132
|
-
- [ ] No `action: omit` was emitted without `decided_by: user` and a business `rationale`. If any, run Scope Review per [references/scope-review-and-omit.md](references/scope-review-and-omit.md).
|
|
133
|
-
- [ ] If any edge case condition applies (drop/refresh mode, review confirmation request, leakage, temporal/evidence signals, omit), the relevant reference's Self-verify items were also satisfied.
|
|
134
|
-
- [ ] No workspace files were read or written directly; no `--format json` stdout was sliced with shell tools. If violated, restart from **Step 1**.
|
|
135
|
-
|
|
136
|
-
</procedures>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Context-only leakage and ownership upgrades
|
|
2
|
-
|
|
3
|
-
Consult this reference when `context reconcile review` returns diagnostics or cutover hints with `code: "context-only-leakage-high"`. For runs without that code, ignore this file.
|
|
4
|
-
|
|
5
|
-
## What the hint means
|
|
6
|
-
|
|
7
|
-
A decision's `proposed.source_ref` cites a block that is **`context_only`** for this Node, or a **secondary-shared** block (the Node is in `owners[]` but not `primary_owner`). Those blocks may inform context but cannot be the support basis for a written Section — that breaks the ownership boundary set during align finalize.
|
|
8
|
-
|
|
9
|
-
`context-only-leakage-high` is a **hard rejection**. Do not convert it into a generic `ask_user` and do not retry the same decision unchanged.
|
|
10
|
-
|
|
11
|
-
## Three repair options
|
|
12
|
-
|
|
13
|
-
The review hint names which one applies per item. Pick exactly one:
|
|
14
|
-
|
|
15
|
-
| Hint repair option | When | What to emit |
|
|
16
|
-
|---|---|---|
|
|
17
|
-
| `rewrite_with_owned_basis` | An owned or shared-primary citation block in the same prepare item supports the same claim | Regenerate the decision citing the owned/primary block; resubmit to `context reconcile review`. |
|
|
18
|
-
| `skip_for_node` | No citation-eligible owned/primary evidence exists in this prepare batch, and the claim is not load-bearing for the Node | Emit `action: ask_user` with `question_type: skip_for_node_confirmation` and the cited evidence; only after user confirms, emit `duplicate_skip` or `omit` (`decided_by: user`). |
|
|
19
|
-
| `pending_ownership_challenge` | The context-only/secondary-shared block contains facts the Node legitimately needs; align must upgrade ownership | Stop the reconcile loop; emit the challenge through the compile draft side (see `plugin/skills/skill-compile-draft/references/structural-challenges.md`) and let the align workflow resolve the split. |
|
|
20
|
-
|
|
21
|
-
## What not to do
|
|
22
|
-
|
|
23
|
-
- Do not paraphrase the offending block into different wording while still citing it — the CLI hashes the cited block, not the prose, so paraphrasing does not lift the leakage flag.
|
|
24
|
-
- Do not promote the block through `request_full_text` — that command exposes visible evidence text for inspection but does not change citation eligibility.
|
|
25
|
-
- Do not silently `duplicate_skip` to make the warning disappear; the hint may indicate a real evidence gap.
|
|
26
|
-
- Do not regenerate the decision with a different `target` to dodge the rule.
|
|
27
|
-
|
|
28
|
-
## How this slots into the main procedure
|
|
29
|
-
|
|
30
|
-
- **Step 4 — Emit**: when review returns `context-only-leakage-high`, treat the affected items as not-yet-decided. Apply the chosen repair option per item, then rerun `context reconcile review` before considering apply.
|
|
31
|
-
- **Step 5 — Self-verify**: no `proposed.source_ref` points at a block whose ownership role for the target Node is `context_only` or secondary-shared. The CLI re-checks at apply time, but catching it here saves a round trip.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Mode-specific semantics
|
|
2
|
-
|
|
3
|
-
Consult this reference when **`prepare.mode` is `drop` or `refresh`**. For the default `compile` mode, ignore this file and follow the main SKILL.md procedure.
|
|
4
|
-
|
|
5
|
-
## Available actions per mode
|
|
6
|
-
|
|
7
|
-
| Action | `compile` | `refresh` | `drop` | `restore` |
|
|
8
|
-
|---|---|---|---|---|
|
|
9
|
-
| `duplicate_skip` / `merge_update` / `supersede` / `keep_separate` / `ask_user` | ✓ | ✓ | (rare) | ✓ |
|
|
10
|
-
| `reanchor` | — | — | **drop-only** | — |
|
|
11
|
-
| `split_then_reanchor` | — | — | **drop-only** | — |
|
|
12
|
-
| `remove_unsupported` | ✓ deprecate | ✓ deprecate | **physical remove** | — |
|
|
13
|
-
|
|
14
|
-
## `remove_unsupported` — mode-dependent write behavior
|
|
15
|
-
|
|
16
|
-
The action is the same, the on-disk effect is not.
|
|
17
|
-
|
|
18
|
-
| Mode | What happens on apply |
|
|
19
|
-
|---|---|
|
|
20
|
-
| `compile` / `refresh` | Target Section's `status` flips to `deprecated`; the unsupported claim stays visible as inactive history. |
|
|
21
|
-
| `drop` | The Section is physically removed from active knowledge after the CLI-managed archive captures the pre-drop snapshot. |
|
|
22
|
-
|
|
23
|
-
Only emit `remove_unsupported` when this mode's outcome is the intended one. A claim that should remain visible-but-stale belongs in `compile`/`refresh`; a claim that the workspace must lose belongs in `drop`.
|
|
24
|
-
|
|
25
|
-
## `reanchor` and `split_then_reanchor` — drop-only
|
|
26
|
-
|
|
27
|
-
These appear only in drop prepare items. They handle "a Section that the drop would remove still has supporting evidence in another source."
|
|
28
|
-
|
|
29
|
-
| Item shape | Decision |
|
|
30
|
-
|---|---|
|
|
31
|
-
| Drop item still **fully** supported by surviving source | `reanchor` + `reanchor` — repoint `proposed.source_ref` at the surviving evidence, keep target unchanged. |
|
|
32
|
-
| Drop item **partly** supported (one fact survives, another does not) | `reanchor` + `split_then_reanchor` — split into `proposed.sections[]`, each with independent `kind` / `content` / optional `summary` / `source_ref`. |
|
|
33
|
-
| No surviving support | `unsupported` + `remove_unsupported` (physical remove on drop apply). |
|
|
34
|
-
|
|
35
|
-
`split_then_reanchor` requires each split Section to be independently supported by its own cited evidence. The CLI rejects splits where any sub-Section's `source_ref` does not cover its `content`.
|
|
36
|
-
|
|
37
|
-
## How this slots into the main procedure
|
|
38
|
-
|
|
39
|
-
- **Step 1 — Consume Prepared Context**: read `prepare.mode` first. If `drop` or `refresh`, the Step 3 classification table extends with the mode-specific rows above.
|
|
40
|
-
- **Step 3 — Decide Relation And Action**: for drop items, use the `reanchor` / `split_then_reanchor` / `remove_unsupported` branches from the table here rather than forcing the items into compile-mode actions.
|
|
41
|
-
- **Step 5 — Self-verify**: confirm no compile-mode action was emitted on a drop item (and vice versa) — the CLI rejects with a clear hint, but catching it here saves a round trip.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Scope Review and `omit` discipline
|
|
2
|
-
|
|
3
|
-
Consult this reference when **you are tempted to emit `action: omit`**, or when an item looks redundant / low-value / non-knowledge. For runs without such items, ignore this file.
|
|
4
|
-
|
|
5
|
-
## Core rule
|
|
6
|
-
|
|
7
|
-
`omit` is **never an automatic decision**. It records a no-write outcome **after** broader scope review and **after** explicit user confirmation. Emitting `omit` without both is a protocol violation.
|
|
8
|
-
|
|
9
|
-
`omit` is also **not the right tool** for:
|
|
10
|
-
|
|
11
|
-
- Conflicts → use `ask_user`.
|
|
12
|
-
- Unsupported evidence → use `unsupported` + `remove_unsupported` (mode-aware; see `references/mode-semantics.md`).
|
|
13
|
-
- Reanchor/drop cases → use `reanchor` or `split_then_reanchor`.
|
|
14
|
-
- Schema / source_ref failures → fix the decision, do not omit.
|
|
15
|
-
|
|
16
|
-
`omit` is **not recorded in the semantic ledger**. There is no audit trail; this is why the confirmation gate exists.
|
|
17
|
-
|
|
18
|
-
## Scope Review pass
|
|
19
|
-
|
|
20
|
-
Before emitting `omit` or `ask_user` with `question_type: omit_confirmation`, run this pass over the full prepared context and the current draft decisions:
|
|
21
|
-
|
|
22
|
-
1. **Covered-by check** — is the item already covered by another decision in the same batch?
|
|
23
|
-
- Yes → convert it to a precise executable action such as `duplicate_skip` and explain the covered-by item in `rationale`. Do not omit.
|
|
24
|
-
|
|
25
|
-
2. **Mergeable check** — should this item's content be merged into another write action?
|
|
26
|
-
- Yes → revise the other write action to incorporate this evidence. Drop the standalone item only after the merged action survives review. Do not omit silently.
|
|
27
|
-
|
|
28
|
-
3. **Provable low-value check** — can you prove from the prepared context that the item is low-value / non-knowledge?
|
|
29
|
-
- Yes (prepared context contains the proof) → emit `ask_user` with `question_type: omit_confirmation` and a business-language prompt.
|
|
30
|
-
- No (you only have a hunch) → emit `ask_user` with `question_type: omit_confirmation` and present the claim + evidence so the user can judge.
|
|
31
|
-
|
|
32
|
-
4. **Scope-wide miscope check** — do several items look low-value, or does the Node boundary / draft scope look wrong?
|
|
33
|
-
- Yes → emit `ask_user` with `question_type: scope_review_required` and **stop before apply**. Do not paper over a scope problem with a series of `omit` decisions.
|
|
34
|
-
|
|
35
|
-
5. **User-confirmed no-write** — only after the user has explicitly answered the `omit_confirmation` or `scope_review_required` question saying "do not write," may you emit:
|
|
36
|
-
|
|
37
|
-
```yaml
|
|
38
|
-
- item_id: claim-007
|
|
39
|
-
relation: keep_separate # or whatever the prepared relation was
|
|
40
|
-
action: omit
|
|
41
|
-
target:
|
|
42
|
-
node: ...
|
|
43
|
-
decided_by: user
|
|
44
|
-
rationale: "<business reason from the user reply>"
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
`decided_by: user` must reflect a specific recent user message answering this specific question (see `references/user-confirmation.md`).
|
|
48
|
-
|
|
49
|
-
## Common anti-patterns
|
|
50
|
-
|
|
51
|
-
- Emitting `omit` because the item "looks redundant" without running Scope Review.
|
|
52
|
-
- Emitting `omit` because review returned `ask_user` and you want to clear the queue.
|
|
53
|
-
- Treating auto mode / earlier "continue" as user confirmation.
|
|
54
|
-
- Using `omit` to dodge a `remove_unsupported` decision in drop mode (the physical-remove behavior is the **point** of drop).
|
|
55
|
-
|
|
56
|
-
## How this slots into the main procedure
|
|
57
|
-
|
|
58
|
-
- **Step 3 — Decide**: when tempted to skip an item, treat that temptation as a signal to run Scope Review **before** writing the decision.
|
|
59
|
-
- **Step 4 — Emit**: only emit `omit` when a specific user reply confirms the no-write outcome; otherwise emit `ask_user`.
|
|
60
|
-
- **Step 5 — Self-verify**: no `action: omit` appears without `decided_by: user` and a `rationale` that names the business reason.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Temporal priors and evidence boundary pointers
|
|
2
|
-
|
|
3
|
-
Consult this reference when prepare items carry **any** of:
|
|
4
|
-
|
|
5
|
-
- `temporal_prior` / `proposed.source_captured_at` / candidate `source_captured_at` / `last_reconciled_at` / `temporal_disposition`
|
|
6
|
-
- raw/source_ref boundary diagnostics or nearby source_ref pointers
|
|
7
|
-
- prepared long `proposed.content` / `proposed.summary`, especially with command / config / code fence content
|
|
8
|
-
|
|
9
|
-
For prepare items that have none of the above, ignore this file.
|
|
10
|
-
|
|
11
|
-
## Temporal priors — review-only signals
|
|
12
|
-
|
|
13
|
-
Compile prepare items may include:
|
|
14
|
-
|
|
15
|
-
- `proposed.source_captured_at` — when the new evidence was captured.
|
|
16
|
-
- Each candidate's `source_captured_at`, `last_reconciled_at`, and `temporal_disposition` (`stale` / `recent` / `concurrent`).
|
|
17
|
-
- A top-level `temporal_prior` summary.
|
|
18
|
-
|
|
19
|
-
Treat these as **priors that explain context, never as license to act**:
|
|
20
|
-
|
|
21
|
-
- They can justify why an older candidate may be stale relative to new evidence.
|
|
22
|
-
- They **do not** change `default_decision`.
|
|
23
|
-
- They are **never** enough on their own to auto-supersede or auto-merge.
|
|
24
|
-
|
|
25
|
-
If you accept or override a temporal prior, state the business reason in `rationale`. **Do not copy temporal fields into the executable `proposed` patch** — the CLI strips them.
|
|
26
|
-
|
|
27
|
-
## Evidence boundary repair
|
|
28
|
-
|
|
29
|
-
When review reports that the cited source_ref is invalid, stale, too narrow, or otherwise cannot support the proposed write, use only CLI-rendered evidence text and canonical source_ref values:
|
|
30
|
-
|
|
31
|
-
- canonical `source_ref` / `source_refs[]` values from the current view
|
|
32
|
-
- block ids and line ranges surfaced by the CLI
|
|
33
|
-
- nearby source_ref pointers included in diagnostics
|
|
34
|
-
|
|
35
|
-
These are **repair hints**, not automatic broadening permission. Rules:
|
|
36
|
-
|
|
37
|
-
1. Use a broader `source_ref` **only when the whole range honestly supports the final claim**. Rerun `context reconcile review` after broadening — review revalidates the new range against workspace raw before apply.
|
|
38
|
-
2. If the proposed summary actually combines several candidate blocks and **no single range honestly supports every sentence**, split the claim into separately supported decisions instead of forcing one unsupported summary through.
|
|
39
|
-
3. Do not invent ranges that include unrelated content just to get the verdict to pass.
|
|
40
|
-
|
|
41
|
-
The support gate exists to prevent orphan claims and false evidence links, not to optimize retrieval. Prefer preserving a precise raw-backed claim over rewriting content into a smoother summary.
|
|
42
|
-
|
|
43
|
-
## Long `proposed.content` / `proposed.summary` preservation
|
|
44
|
-
|
|
45
|
-
When the prepare item carries long `proposed.content` or a `proposed.summary`, treat both as load-bearing:
|
|
46
|
-
|
|
47
|
-
- `content` carries the active Section knowledge, including long-form prose, examples, URLs, tables, commands, config, and code blocks.
|
|
48
|
-
- `summary` is the short reader/query aid for long content.
|
|
49
|
-
- Dropping either field silently loses knowledge or query UX.
|
|
50
|
-
- Preserve prepared `content` and `summary` on executable write decisions (`merge_update`, `supersede.new`, `keep_separate`, `split_then_reanchor` sub-Sections) unless the decision intentionally rewrites the user-facing content.
|
|
51
|
-
- The only legitimate way to clear `summary` is an update-style decision that explicitly emits `summary: null` as the chosen outcome.
|
|
52
|
-
|
|
53
|
-
## How this slots into the main procedure
|
|
54
|
-
|
|
55
|
-
- **Step 1 — Consume**: scan prepare items for the signal fields above; flag affected items for the relevant repair path.
|
|
56
|
-
- **Step 3 — Decide**: temporal priors inform `rationale` but never the action choice; evidence-block hints may justify broadening the cited range.
|
|
57
|
-
- **Step 4 — Emit**: rerun `context reconcile review` after broadening ranges; only then proceed to apply.
|
|
58
|
-
- **Step 5 — Self-verify**: no executable write strips prepared `content` or `summary`; no temporal field leaks into `proposed`; every broadened `source_ref` has been re-reviewed.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# User confirmation paths
|
|
2
|
-
|
|
3
|
-
Consult this reference when `context reconcile review` returns any of:
|
|
4
|
-
|
|
5
|
-
- `support_confirmation` (weak support questions)
|
|
6
|
-
- `omit_confirmation` (no-write outcome under Scope Review)
|
|
7
|
-
- `scope_review_required` (item set looks miscoped)
|
|
8
|
-
- any other `ask_user` question that needs user input before apply
|
|
9
|
-
|
|
10
|
-
For runs where review emits no questions, ignore this file.
|
|
11
|
-
|
|
12
|
-
## What counts as "user confirmation"
|
|
13
|
-
|
|
14
|
-
Only **explicit user reply to a question your agent asked**. The following are **not** confirmation:
|
|
15
|
-
|
|
16
|
-
- Auto mode being active
|
|
17
|
-
- Delegated mode being active (`--delegated` lets the CLI make scoped low-risk review decisions; it is not user confirmation for a specific question)
|
|
18
|
-
- A blanket "continue" / "yes go ahead" earlier in the session
|
|
19
|
-
- Permission to run shell commands
|
|
20
|
-
- A previous decision applied with `decided_by: user` for a different item
|
|
21
|
-
|
|
22
|
-
If you cannot point at a specific user message answering the specific question for this specific item, **do not emit `decided_by: user`**.
|
|
23
|
-
|
|
24
|
-
## Weak support handling
|
|
25
|
-
|
|
26
|
-
A prepare item is "weakly supported" when cited evidence plausibly covers a compressed or rewritten claim, but review requires human confirmation before applying it. `context reconcile review` flags these and may return `support_confirmation`.
|
|
27
|
-
|
|
28
|
-
Rules:
|
|
29
|
-
|
|
30
|
-
- Weak support is **only** acceptable on `keep_separate`. It is **not** acceptable on `merge_update`, `supersede`, `reanchor`, or `split_then_reanchor` — those overwrite, replace, or move an existing evidence boundary and need stronger backing.
|
|
31
|
-
- When review asks `support_confirmation`, present the business claim and cited evidence to the user in business language. Do not expose `src-N` / Section ids / source refs as the user-facing choice.
|
|
32
|
-
- If the user confirms, regenerate the same executable decision with `decided_by: user` and rerun review. If they decline, choose stricter evidence, broaden the cited range honestly, or leave the item as `ask_user` and stop before apply.
|
|
33
|
-
|
|
34
|
-
## Grouping `support_confirmation`
|
|
35
|
-
|
|
36
|
-
When review provides the **same `group_key`** on several questions that are all ordinary summary / compression checks, group them into one compact confirmation:
|
|
37
|
-
|
|
38
|
-
- One question to the user listing all grouped claims and their cited evidence.
|
|
39
|
-
- If confirmed, emit `decided_by: user` on each grouped decision.
|
|
40
|
-
|
|
41
|
-
**Do not group**:
|
|
42
|
-
|
|
43
|
-
- Questions that introduce new claims (the user is making a fact-level call, not a wording call).
|
|
44
|
-
- Questions where one item lacks evidence that the others have.
|
|
45
|
-
- Questions whose evidence boundaries differ (different sources / different blocks).
|
|
46
|
-
|
|
47
|
-
When in doubt, ask separately.
|
|
48
|
-
|
|
49
|
-
## `omit_confirmation` and `scope_review_required`
|
|
50
|
-
|
|
51
|
-
These are escape hatches from the omit gate. See `references/scope-review-and-omit.md` for when to emit them.
|
|
52
|
-
|
|
53
|
-
When review returns either as an unresolved `ask_user` item, ask the user, capture the answer, and act:
|
|
54
|
-
|
|
55
|
-
- User confirms no-write → final decision is `action: omit` with `decided_by: user` and a business `rationale`. `omit` is not recorded in the semantic ledger.
|
|
56
|
-
- User declines → revise the item to a concrete write action or to `ask_user` with a sharper question.
|
|
57
|
-
|
|
58
|
-
## Final-decision invariants
|
|
59
|
-
|
|
60
|
-
After user confirmation:
|
|
61
|
-
|
|
62
|
-
- `decided_by` is a **top-level** decision field, not a `proposed` sub-field.
|
|
63
|
-
- Final executable decisions must not carry `user_confirmation.required: true`. That flag belongs only on `action: ask_user` items that still need input.
|
|
64
|
-
- User confirmation permits weak support and omit. It does **not** permit unsupported evidence or contradictory claims — those still need stricter evidence or stay `ask_user`.
|
|
65
|
-
- `decided_by: delegated_agent` is reserved for CLI-generated decisions inside a delegated compile workflow. Do not emit it from this skill.
|
|
66
|
-
|
|
67
|
-
## How this slots into the main procedure
|
|
68
|
-
|
|
69
|
-
- **Step 3 — Decide**: keep `support_confirmation` / `omit_confirmation` / `scope_review_required` candidates as `ask_user` with the right `question_type` until the user replies.
|
|
70
|
-
- **Step 4 — Emit**: only after a user reply may you upgrade an `ask_user` to an executable decision with `decided_by: user`.
|
|
71
|
-
- **Step 5 — Self-verify**: every `decided_by: user` corresponds to a specific recent user message; if not, downgrade back to `ask_user`.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
|
-
import { basename, join } from "node:path";
|
|
4
|
-
|
|
5
|
-
const outdir = join(process.cwd(), "templates", "aspect-runtime");
|
|
6
|
-
await mkdir(outdir, { recursive: true });
|
|
7
|
-
|
|
8
|
-
const result = await Bun.build({
|
|
9
|
-
entrypoints: [join(process.cwd(), "src", "aspect-runtime", "index.ts")],
|
|
10
|
-
outdir,
|
|
11
|
-
naming: "aspectRunnerSdk.js",
|
|
12
|
-
target: "node",
|
|
13
|
-
format: "esm",
|
|
14
|
-
external: [
|
|
15
|
-
"remark-gfm",
|
|
16
|
-
"remark-mdx",
|
|
17
|
-
"remark-parse",
|
|
18
|
-
"remark-stringify",
|
|
19
|
-
"typescript",
|
|
20
|
-
"unified",
|
|
21
|
-
],
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
if (!result.success) {
|
|
25
|
-
for (const log of result.logs) {
|
|
26
|
-
console.error(log);
|
|
27
|
-
}
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
for (const output of result.outputs) {
|
|
32
|
-
console.log(` ${basename(output.path)} ${(output.size / 1024).toFixed(1)} KB`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const target = join(outdir, "aspectRunnerSdk.js");
|
|
36
|
-
if (!existsSync(target)) {
|
|
37
|
-
throw new Error(`aspect runtime build did not emit ${target}`);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let content = await readFile(target, "utf8");
|
|
41
|
-
content = [
|
|
42
|
-
"/* Generated by packages/context-cli/scripts/build-aspect-runtime.ts. Do not edit directly. */",
|
|
43
|
-
content,
|
|
44
|
-
].join("\n");
|
|
45
|
-
await writeFile(target, content);
|