@c4a/context-cli 0.5.41-beta.7 → 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 +51114 -97079
- 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 +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 -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,296 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-prose-align
|
|
3
|
+
description: >
|
|
4
|
+
Internal procedure invoked by the public Context continuation entry; not a user command.
|
|
5
|
+
Uses Context document evidence views to propose, validate, and confirm
|
|
6
|
+
`unapproved/structure.yaml` without reading raw snapshots directly.
|
|
7
|
+
tools:
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# skill-prose-align
|
|
12
|
+
|
|
13
|
+
Turn captured document evidence into confirmed structure.
|
|
14
|
+
|
|
15
|
+
## TL;DR
|
|
16
|
+
|
|
17
|
+
- Use this after document capture, or when the user asks to split, merge,
|
|
18
|
+
reorganize, classify, or relate document evidence.
|
|
19
|
+
- The first product output is a structure draft, not final page body.
|
|
20
|
+
- Read source material only through CLI evidence views: `read-plan`,
|
|
21
|
+
`source-index`, `span-detail`, `span-text`, `schema`, and
|
|
22
|
+
`structure-summary`. Additional views are diagnostic surfaces; use the route
|
|
23
|
+
and view set returned by the CLI.
|
|
24
|
+
- Write and validate `context.structure.v1` into `unapproved/structure.yaml`.
|
|
25
|
+
Stop for user confirmation before compile.
|
|
26
|
+
- Before classifying nodes, section plans, edges, weak evidence, duplicates,
|
|
27
|
+
conflicts, ownership, or unresolved items, read the current procedure
|
|
28
|
+
references listed by the CLI as `semantic_reference_files`. These references
|
|
29
|
+
are the current structure judgment rules, not summaries.
|
|
30
|
+
- Do not produce or validate a structure payload from this entry file alone. If
|
|
31
|
+
the relevant `semantic_reference_files` have not been read in the current
|
|
32
|
+
turn, stop and read them first.
|
|
33
|
+
- When status reaches `structure-ready` or `needs-prose-compile`, hand off to
|
|
34
|
+
`../skill-prose-compile/SKILL.md`.
|
|
35
|
+
- Compile, review, close, verify, and build remain separate gates.
|
|
36
|
+
|
|
37
|
+
<reference>
|
|
38
|
+
|
|
39
|
+
## User-Facing Gates
|
|
40
|
+
|
|
41
|
+
Use semantic labels, not SDK function names:
|
|
42
|
+
|
|
43
|
+
| Gate | Say this | Do not say this first |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Material investigation | "I will read the evidence index and source spans through Context, then propose a structure draft." | `alignProse`, `source-index`, `context.structure.v1` |
|
|
46
|
+
| Structure confirmation | "Confirming this structure freezes page paths, section ownership, and relationships for this compile round." | `unapproved/structure.yaml` as a raw parameter |
|
|
47
|
+
| Compile handoff | "The structure is confirmed; I will switch to source-bound compile for draft pages." | Continuing to edit structure in compile |
|
|
48
|
+
|
|
49
|
+
## Runtime Discipline
|
|
50
|
+
|
|
51
|
+
Use these rules in the current phase-runner flow:
|
|
52
|
+
|
|
53
|
+
- Follow the top-level state, `routing.next_commands`, CLI `next_action`, and
|
|
54
|
+
CLI-returned `next_command` values for every write. Treat `allowed_actions[]`
|
|
55
|
+
as permission for read-only insertions; it is not a menu of alternate write
|
|
56
|
+
paths.
|
|
57
|
+
- Use `views[].command` / `next_command` for evidence reads, prioritizing the
|
|
58
|
+
CLI-designated expected view when present.
|
|
59
|
+
- Treat `agent_hints[]` as temporary diagnostics. If an agent hint conflicts
|
|
60
|
+
with a top-level `next_action` or status route, follow the top-level route.
|
|
61
|
+
- Do not use direct file tools, shell scripts, `jq`, `sed`, `cat`, `head`,
|
|
62
|
+
`tail`, Python, or Node.js to inspect `sources/`, `unapproved/`,
|
|
63
|
+
`knowledge/`, `dist/`, or CLI-managed `.tmp` as a substitute for Context
|
|
64
|
+
views.
|
|
65
|
+
- Write digest/hash flags are stale guards. Use the value returned by the CLI;
|
|
66
|
+
do not parse stdout fragments or host tool-result files to reconstruct one.
|
|
67
|
+
- Delegated execution is only valid when the user explicitly authorizes it in
|
|
68
|
+
this conversation. Do not infer it from "continue", "继续", or general trust.
|
|
69
|
+
- Run one write at a time. Do not parallelize align stage, compile stage, review
|
|
70
|
+
apply, close, or build writes.
|
|
71
|
+
- If a payload is too large for a heredoc, stage it under
|
|
72
|
+
`.tmp/agent-payloads/<run-id>/...` in the workspace root and redirect stdin
|
|
73
|
+
from that file. Never reuse fixed `/tmp/c4a-*` names, and never place agent
|
|
74
|
+
scratch payloads under CLI-managed `.tmp/context-cli/`, `sources/`,
|
|
75
|
+
`unapproved/`, `knowledge/`, `dist/`, or package output directories.
|
|
76
|
+
- If a validation or view response includes `reason_code`, `path`, `missing[]`,
|
|
77
|
+
`diagnostics`, `repair_hints`, or `agent_hints`, treat those fields as the
|
|
78
|
+
repair contract. Do not recover by replaying a stale manual route, editing
|
|
79
|
+
rendered files, or guessing schema aliases.
|
|
80
|
+
|
|
81
|
+
## Evidence Views
|
|
82
|
+
|
|
83
|
+
Recommended read order:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
context run align:<type>:<source>:<collection> --view read-plan --format json
|
|
87
|
+
context run align:<type>:<source>:<collection> --view source-index --compact --format json
|
|
88
|
+
context run align:<type>:<source>:<collection> --view span-detail --span <source-ref> --format json
|
|
89
|
+
context run align:<type>:<source>:<collection> --view span-text --span <source-ref> --format json
|
|
90
|
+
context run align:<type>:<source>:<collection> --view schema --format json
|
|
91
|
+
context run align:<type>:<source>:<collection> --view structure-summary --input <structure.yaml> --format json
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Use CLI-returned `next_command` values for pagination. Do not reconstruct
|
|
95
|
+
documents with ad hoc `cat`, `grep`, or scripts against `sources/` or `.tmp`.
|
|
96
|
+
|
|
97
|
+
## Structure Contract
|
|
98
|
+
|
|
99
|
+
The structure draft uses `schema_version: context.structure.v1` and lives at
|
|
100
|
+
`unapproved/structure.yaml` after staging. It contains:
|
|
101
|
+
|
|
102
|
+
- lifecycle state such as validated/confirmed and frozen snapshot metadata;
|
|
103
|
+
- concept `nodes[]` with stable `node_ref`, `node_type`, title/summary, and
|
|
104
|
+
ownership;
|
|
105
|
+
- materialized `views[]` with `view_ref`, collection, path, section plans, and
|
|
106
|
+
evidence refs;
|
|
107
|
+
- typed edges using the closed set defined by the CLI;
|
|
108
|
+
- unresolved items when evidence is weak, conflicting, or the target node is
|
|
109
|
+
missing.
|
|
110
|
+
|
|
111
|
+
Confirmed structure is a human gate. Validation passing is not the same as
|
|
112
|
+
confirmation. Do not write `lifecycle.state: confirmed`, `confirmed_by`,
|
|
113
|
+
`confirmed_at`, or `structure_digest` until the user has explicitly confirmed
|
|
114
|
+
the structure proposal in the conversation.
|
|
115
|
+
|
|
116
|
+
## Procedure References
|
|
117
|
+
|
|
118
|
+
These are current structure planning rules. They define the source-bound
|
|
119
|
+
semantic gates for Node planning, section ownership, and relationship handling.
|
|
120
|
+
|
|
121
|
+
| Decision | Reference |
|
|
122
|
+
|---|---|
|
|
123
|
+
| Structure planning, Node ownership, density, candidate resolution | [references/internal-procedures/structure-planning.md](references/internal-procedures/structure-planning.md) |
|
|
124
|
+
| Node type, title, tags, fake entity, action/domain gates, edge gates | [references/internal-procedures/structure-planning/references/gates.md](references/internal-procedures/structure-planning/references/gates.md) |
|
|
125
|
+
| Source density and coarse reading judgment | [references/internal-procedures/structure-planning/references/density-profile.md](references/internal-procedures/structure-planning/references/density-profile.md) |
|
|
126
|
+
| Candidate anomalies, stable ids, paths, duplicates, and conflicts | [references/internal-procedures/structure-planning/references/candidate-resolution.md](references/internal-procedures/structure-planning/references/candidate-resolution.md) |
|
|
127
|
+
|
|
128
|
+
</reference>
|
|
129
|
+
|
|
130
|
+
<procedures>
|
|
131
|
+
|
|
132
|
+
### Step 1 — Open Material Investigation
|
|
133
|
+
|
|
134
|
+
Run:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
context run align:<type>:<source>:<collection> --view read-plan --format json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Use the returned views, budgets, snapshot hash, and next actions. If the CLI
|
|
141
|
+
reports a missing or stale snapshot, route back to source capture/refresh. Do
|
|
142
|
+
not read the snapshot file yourself.
|
|
143
|
+
|
|
144
|
+
### Step 2 — Read Evidence Through The Index
|
|
145
|
+
|
|
146
|
+
Read a compact index before requesting exact spans:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
context run align:<type>:<source>:<collection> --view source-index --compact --format json
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
For exact evidence, copy CLI-returned source refs or next commands:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
context run align:<type>:<source>:<collection> --view span-detail --span <source-ref> --format json
|
|
156
|
+
context run align:<type>:<source>:<collection> --view span-text --span <source-ref> --format json
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Keep a short note of what evidence supports each proposed node, section, and
|
|
160
|
+
edge. If the evidence is weak or conflicting, keep it as unresolved instead of
|
|
161
|
+
turning it into a fact.
|
|
162
|
+
|
|
163
|
+
Before drafting structure, read:
|
|
164
|
+
|
|
165
|
+
- [references/internal-procedures/structure-planning.md](references/internal-procedures/structure-planning.md)
|
|
166
|
+
- [references/internal-procedures/structure-planning/references/gates.md](references/internal-procedures/structure-planning/references/gates.md)
|
|
167
|
+
- [references/internal-procedures/structure-planning/references/density-profile.md](references/internal-procedures/structure-planning/references/density-profile.md)
|
|
168
|
+
- [references/internal-procedures/structure-planning/references/candidate-resolution.md](references/internal-procedures/structure-planning/references/candidate-resolution.md)
|
|
169
|
+
|
|
170
|
+
Do not treat this as optional background. These files contain the current
|
|
171
|
+
semantic gates for source-bound structure planning. A structure payload drafted
|
|
172
|
+
without the applicable references is incomplete, even if the CLI schema accepts
|
|
173
|
+
its shape.
|
|
174
|
+
|
|
175
|
+
### Step 3 — Draft And Validate Structure
|
|
176
|
+
|
|
177
|
+
Request the schema:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
context run align:<type>:<source>:<collection> --view schema --format json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Create a `context.structure.v1` YAML file. The draft may include a one-page-per
|
|
184
|
+
source shape, but that is represented as ordinary nodes and sections; it does
|
|
185
|
+
not bypass structure confirmation.
|
|
186
|
+
|
|
187
|
+
For small payloads, use stdin/heredoc. For larger payloads, write a scratch file
|
|
188
|
+
under `.tmp/agent-payloads/<run-id>/` and pass it through `--input`. Scratch
|
|
189
|
+
files are disposable agent working files; they are never phase state and
|
|
190
|
+
must not be read back as a substitute for CLI views.
|
|
191
|
+
|
|
192
|
+
Validate:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
context run align:<type>:<source>:<collection> --validate --input <structure.yaml> --format json
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Validation returns `structure_summary` and writes a temporary
|
|
199
|
+
`structure_report.path` under `.tmp/context-runtime/reports/`. Use those
|
|
200
|
+
artifacts as the primary confirmation material; do not ask the user to confirm a
|
|
201
|
+
structure they cannot inspect. If the user needs a focused view, run:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
context run align:<type>:<source>:<collection> --view structure-summary --input <structure.yaml> --format json
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Repair diagnostics by routing them to the right decision:
|
|
208
|
+
|
|
209
|
+
- source ref or snapshot mismatch -> reread evidence views or refresh capture;
|
|
210
|
+
- unsupported node/section/edge -> remove it or mark unresolved;
|
|
211
|
+
- duplicate/conflict -> ask the user which structure should win;
|
|
212
|
+
- illegal edge type, missing target node, or edge without source refs -> fix the
|
|
213
|
+
structure or keep the relation unresolved;
|
|
214
|
+
- stale structure -> regenerate from the current snapshot hash.
|
|
215
|
+
|
|
216
|
+
When validation returns a new `next_action.command`, follow that exact command.
|
|
217
|
+
When it returns blocking diagnostics without a write command, repair and
|
|
218
|
+
validate again. Do not stage a structure just because the YAML shape looks
|
|
219
|
+
valid.
|
|
220
|
+
|
|
221
|
+
### Step 4 — Review Structure Before Confirmation
|
|
222
|
+
|
|
223
|
+
After validation, and again after a draft structure is staged, show the user:
|
|
224
|
+
|
|
225
|
+
- node list and planned paths;
|
|
226
|
+
- section ownership;
|
|
227
|
+
- typed edges and unresolved relation candidates;
|
|
228
|
+
- expected compile order;
|
|
229
|
+
- downstream impact: these choices freeze paths, section ownership, and
|
|
230
|
+
relationships for this compile round.
|
|
231
|
+
- the `structure_report.path` generated by validate or `--view
|
|
232
|
+
structure-summary`.
|
|
233
|
+
|
|
234
|
+
If the CLI stage result includes `next_action.human_gate: true`, treat it as a
|
|
235
|
+
hard stop for structure review. Do not ask for a blind "confirm structure"
|
|
236
|
+
reply. Surface the report path and enough structured summary for the user to
|
|
237
|
+
inspect what will be confirmed.
|
|
238
|
+
|
|
239
|
+
Use the host's multi-choice question tool when available. If unavailable, use a
|
|
240
|
+
short Markdown fallback. Good options are:
|
|
241
|
+
|
|
242
|
+
- Confirm this structure and continue to compile.
|
|
243
|
+
- Revise the structure with additional guidance.
|
|
244
|
+
- Go back to source scope or capture because the evidence set is wrong.
|
|
245
|
+
|
|
246
|
+
Only after confirmation, run the CLI confirmation command, normally:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
context run align:<type>:<source>:<collection> --confirm --format json
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
If confirming a structure file other than `unapproved/structure.yaml`, pass it
|
|
253
|
+
with `--input <structure.yaml>`. A draft stage in `unapproved/structure.yaml` is
|
|
254
|
+
not confirmation. Do not edit `unapproved/structure.yaml` after confirmation to
|
|
255
|
+
change meaning; return to this gate instead.
|
|
256
|
+
|
|
257
|
+
### Step 5 — Handoff To Compile
|
|
258
|
+
|
|
259
|
+
After the user confirms the structure and the CLI reports `structure-ready` or
|
|
260
|
+
`needs-prose-compile`, stop this procedure and follow:
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
../skill-prose-compile/SKILL.md
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Do not keep editing structure while compiling. If compile diagnostics show the
|
|
267
|
+
planned structure is wrong, return to this align gate and ask the user to
|
|
268
|
+
confirm the corrected structure.
|
|
269
|
+
|
|
270
|
+
### Step 6 — Self-verify Checklist
|
|
271
|
+
|
|
272
|
+
- [ ] Evidence came only from Context evidence views.
|
|
273
|
+
- [ ] `context.structure.v1` was validated before user confirmation.
|
|
274
|
+
- [ ] User confirmed the structure before compile.
|
|
275
|
+
- [ ] Compile was delegated to `skill-prose-compile`; this procedure did not
|
|
276
|
+
write draft page body.
|
|
277
|
+
- [ ] Relationships are expressed as structure edges or unresolved items.
|
|
278
|
+
- [ ] No direct edits were made to `sources/`, `.tmp`, `unapproved/`,
|
|
279
|
+
`knowledge/`, review HTML, or `dist/`.
|
|
280
|
+
|
|
281
|
+
### Final Report
|
|
282
|
+
|
|
283
|
+
Report in the user's language. Include only:
|
|
284
|
+
|
|
285
|
+
- evidence views actually read;
|
|
286
|
+
- proposed and confirmed node count, section count, edge count, and unresolved
|
|
287
|
+
count;
|
|
288
|
+
- user confirmation outcome;
|
|
289
|
+
- validation warnings that still matter for compile;
|
|
290
|
+
- next route reported by status or the align phase.
|
|
291
|
+
|
|
292
|
+
Do not report payload digests, snapshot hashes, source-ref hashes, absolute
|
|
293
|
+
paths, or scratch file paths unless the CLI explicitly asks the user to repair
|
|
294
|
+
one.
|
|
295
|
+
|
|
296
|
+
</procedures>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Candidate Resolution Rules
|
|
2
|
+
|
|
3
|
+
Use these rules after reading the current align evidence views and before
|
|
4
|
+
authoring `context.structure.v1`. They define how current anomaly diagnostics
|
|
5
|
+
map to supported structure outcomes.
|
|
6
|
+
|
|
7
|
+
## Anomaly Signals
|
|
8
|
+
|
|
9
|
+
Anomaly diagnostics are mechanical warnings. Do not ignore them and do not treat
|
|
10
|
+
them as recommendations.
|
|
11
|
+
|
|
12
|
+
For each anomaly, choose one current outcome and record the reasoning in the
|
|
13
|
+
structure payload or user-facing explanation:
|
|
14
|
+
|
|
15
|
+
| Outcome | Use When |
|
|
16
|
+
|---|---|
|
|
17
|
+
| Accept the correction | The anomaly points to a real structure fix. Apply a concrete node, section, edge, or ownership correction supported by source refs. |
|
|
18
|
+
| Dismiss with rationale | The warning is mechanically true but semantically harmless. Keep the structure and state why in the confirmation summary. |
|
|
19
|
+
| Keep unresolved | The warning changes structure but source evidence is insufficient. Add an `unresolved[]` item instead of guessing. |
|
|
20
|
+
|
|
21
|
+
Known anomaly kinds:
|
|
22
|
+
|
|
23
|
+
| Kind | Meaning | Required handling |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| Missing evidence | A proposed node, section, or edge has no source-backed evidence. | Add source refs, remove it, or keep the issue unresolved. |
|
|
26
|
+
| Structure churn | A node was renamed, split, merged, replaced, or rejected during investigation. | Confirm the final id/title/target with the user or keep the ambiguity unresolved. |
|
|
27
|
+
| Duplicate evidence | The same source ref appears more than once for the same semantic role. | Deduplicate it or explain why the repeated ref supports different roles. |
|
|
28
|
+
| Broad review needed | The CLI collapsed many anomalies or reports aggregate risk. | Review the affected structure broadly; do not finalize solely from ordering. |
|
|
29
|
+
|
|
30
|
+
## Stable References
|
|
31
|
+
|
|
32
|
+
Use stable `node_ref`, `view_ref`, and `section_ref` values from the current
|
|
33
|
+
`context.structure.v1` payload for in-payload references. A NodeRef should be
|
|
34
|
+
safe, lower-case, and path-shaped, such as `entity/rspack` or
|
|
35
|
+
`domain/build-tooling`. `slug` and `path` are derived fields in the current
|
|
36
|
+
flow; do not invent alternate reference aliases.
|
|
37
|
+
|
|
38
|
+
When an edge or section points at knowledge:
|
|
39
|
+
|
|
40
|
+
- use the schema ref that matches the target layer:
|
|
41
|
+
`node_ref` for a conceptual Node, `view_ref` for a collection view, and
|
|
42
|
+
`section_ref` for a planned section;
|
|
43
|
+
- ensure the target NodeRef, ViewRef, or SectionRef exists in the current
|
|
44
|
+
structure or approved knowledge;
|
|
45
|
+
- keep relation hints unresolved when the target does not exist;
|
|
46
|
+
- follow CLI diagnostics if a ref is unknown or stale.
|
|
47
|
+
|
|
48
|
+
Do not create alternate alias fields or non-schema candidate ledger fields.
|
|
49
|
+
They are not part of the current structure contract.
|
|
50
|
+
|
|
51
|
+
## Visible Labels And Audit Rationale
|
|
52
|
+
|
|
53
|
+
Humans need to understand merge, reject, rename, and replacement choices
|
|
54
|
+
without decoding temporary ids. Keep that discipline in the current structure
|
|
55
|
+
flow through current fields:
|
|
56
|
+
|
|
57
|
+
- use `title` and `summary` to name the final node in user-facing language;
|
|
58
|
+
- explain renamed/split/merged candidates in the confirmation summary, not by
|
|
59
|
+
adding non-schema label fields;
|
|
60
|
+
- when a relation or rename cannot be settled from evidence, put the visible
|
|
61
|
+
title/target clue in `unresolved[]`;
|
|
62
|
+
- when asking the user, phrase the choice with business labels ("Rspack build
|
|
63
|
+
tool page" vs "Webpack page"), not with source refs or internal section ids.
|
|
64
|
+
|
|
65
|
+
NodeRef is the stable conceptual identity. ViewRef is the collection-specific
|
|
66
|
+
view identity and is the durable approved-page identity. SectionRef is the
|
|
67
|
+
stable planned-section identity under a ViewRef. Package paths are derived from
|
|
68
|
+
the approved ViewRef plus containment/slug; do not treat paths as an alternate
|
|
69
|
+
identity contract. Visible labels help humans review the choice, but they do
|
|
70
|
+
not authorize a different NodeRef, ViewRef, edge, or section ownership without
|
|
71
|
+
source-backed evidence and user confirmation.
|
|
72
|
+
|
|
73
|
+
## Duplicate And Conflict Handling
|
|
74
|
+
|
|
75
|
+
- Exact duplicate structure -> keep one node/section/edge and explain the
|
|
76
|
+
duplicate in the confirmation summary.
|
|
77
|
+
- Same topic but different evidence boundary -> keep separate sections only
|
|
78
|
+
when each section has a distinct source-backed role.
|
|
79
|
+
- Conflicting facts -> ask the user or keep an `unresolved[]` item. Do not
|
|
80
|
+
pick a winner from title order or source order.
|
|
81
|
+
- Replacement or rename -> ask the user when it changes NodeRef, ViewRef,
|
|
82
|
+
containment, slug, or the derived approved path. These are durable user-facing
|
|
83
|
+
identities, not disposable labels.
|
|
84
|
+
|
|
85
|
+
## Self-verify
|
|
86
|
+
|
|
87
|
+
- [ ] Every accepted node, section, and edge has source-backed support.
|
|
88
|
+
- [ ] Every unresolved relation or conflict is explicit in `unresolved[]`.
|
|
89
|
+
- [ ] No non-schema candidate ledger fields or alias fields appear in the payload.
|
|
90
|
+
- [ ] NodeRef, ViewRef, and SectionRef values, not temporary labels or paths,
|
|
91
|
+
are used for current references.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Evidence Density Selection
|
|
2
|
+
|
|
3
|
+
Use density as a private reading and section-planning strategy. It is not a
|
|
4
|
+
separate payload, not a quality score, and not a workflow stage. Persist only
|
|
5
|
+
current `context.structure.v1` fields such as `nodes[]`, `sections[]`,
|
|
6
|
+
`source_refs[]`, `edges[]`, and `unresolved[]`.
|
|
7
|
+
|
|
8
|
+
Apply this reference when a captured source is long, dense, fragmented, or hard
|
|
9
|
+
to split into stable planned sections. Use the current CLI evidence views
|
|
10
|
+
(`read-plan`, `source-index`, `span-detail`, `span-text`) to inspect material;
|
|
11
|
+
do not invent a separate coarse-read artifact.
|
|
12
|
+
|
|
13
|
+
| Profile | Use When | Agent Behavior |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `macro` | A long source has many headings, sections, or broad topic shifts. | Create section proposals around major headings and preserve document-level anchors so later passes do not flatten scope. |
|
|
16
|
+
| `meso` | Default for normal product, design, or operational documents with several related sections. | Produce section proposals for meaningful local units and preserve evidence anchors. |
|
|
17
|
+
| `micro` | The source is fragmented, note-like, or dense with short independent claims. | Keep section proposals narrow and avoid bundling unrelated blocks into one candidate. |
|
|
18
|
+
| `single_pass` | The source is short enough that one read can safely discover all relevant structure. | Keep anchors minimal and avoid over-segmentation, but still validate the resulting structure. |
|
|
19
|
+
|
|
20
|
+
Treat Markdown heading changes as section-planning hints, not hard boundaries.
|
|
21
|
+
Sibling sub-headings under a shared parent can remain in one planned section
|
|
22
|
+
when they form one coherent semantic topic for that parent. Headings with no
|
|
23
|
+
shared parent should usually split unless you intentionally want one section to
|
|
24
|
+
span them. When a dense source has many headings, split by heading first, then
|
|
25
|
+
merge adjacent or sibling groups only when the merged section is still one
|
|
26
|
+
coherent fact group.
|
|
27
|
+
|
|
28
|
+
Do not let density alone choose `node_type`, `tags`, `section.kind`, or body
|
|
29
|
+
content. Action/domain gates are decided from source evidence and the current
|
|
30
|
+
schema, not from density metadata.
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Node Classification Gates
|
|
2
|
+
|
|
3
|
+
Use these gates before every structure draft and before authoring the align
|
|
4
|
+
payload described by the current schema view.
|
|
5
|
+
Align owns Node type, tag, graph, planned Section, and ownership classification. It does **not** write Section prose.
|
|
6
|
+
|
|
7
|
+
Current schema mapping:
|
|
8
|
+
|
|
9
|
+
- Treat the action checklist, domain checklist, and inference tables as private
|
|
10
|
+
working notes unless the current schema view explicitly exposes matching
|
|
11
|
+
fields.
|
|
12
|
+
- In `context.structure.v1`, persist the outcome through `node_type`, `tags`,
|
|
13
|
+
`summary`, `ownership`, `sections[].source_refs`, `edges[]`, and
|
|
14
|
+
`unresolved[]`.
|
|
15
|
+
- Do not add unknown gate fields to the payload just because this procedure uses
|
|
16
|
+
them for reasoning.
|
|
17
|
+
|
|
18
|
+
## Node Type Order
|
|
19
|
+
|
|
20
|
+
Answer in this order and stop at the first match:
|
|
21
|
+
|
|
22
|
+
1. **Action?** A large executable event / process with both:
|
|
23
|
+
- scale: can support `planned_sections` with at least two distinct Section kinds, or contains at least one child Action;
|
|
24
|
+
- process evidence: explicit steps, phases, trigger -> handling -> result, role collaboration, or repeatable plan. Parallel lists such as "three API modes" are not process evidence.
|
|
25
|
+
Single-section exceptions are allowed only when the collection route and
|
|
26
|
+
source evidence give the record its own lifecycle or tracking identity:
|
|
27
|
+
product `user-story`, test `scenario`, or incident `action-item` /
|
|
28
|
+
incident record. These still need source-backed acceptance, lifecycle,
|
|
29
|
+
scenario, or tracking evidence; otherwise keep the material as a Section
|
|
30
|
+
under the owning Node.
|
|
31
|
+
2. **Entity?** A concrete independent subject with retrieval value: deployable code, product/application/system, library/module/CLI/symbol, or an atomic term/pattern.
|
|
32
|
+
3. **Domain?** A container/scope that groups at least one child Node.
|
|
33
|
+
4. Otherwise do not create a Node; leave the material for compile as a Section under the owning Node.
|
|
34
|
+
|
|
35
|
+
Good examples:
|
|
36
|
+
|
|
37
|
+
| Type | Examples |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `domain` | "X business domain", "Y technical area", "Z research topic" |
|
|
40
|
+
| `entity` concrete | `@acme/api-server`, `@acme/ui-kit` `Button`, "X sub-application" |
|
|
41
|
+
| `entity` term | "X identifier", "Y business metric", idempotency |
|
|
42
|
+
| `action` | "user submits X request end-to-end flow", "operator executes Y change flow", "team Z release flow" |
|
|
43
|
+
|
|
44
|
+
## Title and Source Heading Rules
|
|
45
|
+
|
|
46
|
+
Classify the Node by the evidence referent, not by the source file title, heading, or local section title. A source title is ordinary evidence just like body prose. It has no automatic right to become `node.title`, `aliases[]`, or `slug`.
|
|
47
|
+
|
|
48
|
+
After choosing `node_type`, choose the title to fit that type:
|
|
49
|
+
|
|
50
|
+
| Final type | Title shape |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `entity` concrete | The concrete product, service, library, module, CLI, symbol, application, or system name. |
|
|
53
|
+
| `entity` term | The atomic concept or pattern name, without extra scope/process suffixes. |
|
|
54
|
+
| `domain` | The grouping scope that owns child Nodes. |
|
|
55
|
+
| `action` | The executable process / runbook / flow name that passed the Action Gate. |
|
|
56
|
+
|
|
57
|
+
Scope/process words in a source title are warning signals when proposed as an Entity title, not hard classification rules. Re-check the type/title when a proposed Entity title contains words such as "方案", "架构", "体系", "演练", "流程", "策略", "能力", "机制", "framework", "architecture", "system", "strategy", "process", or "drill". Keep the wording only when evidence shows it is the formal name of a concrete object or an atomic term.
|
|
58
|
+
|
|
59
|
+
Do not promote broad architecture/system/方案 content to `domain` just because it sounds like a scope. When the source has writable Sections but no resolvable current/existing child Nodes, use an Entity such as `[system]` or `[application]` and put the architecture facts in Sections. Use `domain` only when it groups child Nodes through supported `edges[]`.
|
|
60
|
+
|
|
61
|
+
Relation-only sources should not force title copying or dangling graph edges. Decide placeholder handling in this order:
|
|
62
|
+
|
|
63
|
+
1. If resolved current/existing child Nodes make the page a real grouping scope, keep the relation evidence as supported `edges[]` only when the Domain also has at least one source-backed planned Section.
|
|
64
|
+
2. If an explicit user-facing retrieval need or graph need makes the source/page identity valuable, and the title names an atomic concept or concrete object, keep that identity in `unresolved[]` until it has source-backed section evidence, a valid generated `parent_index` view with source-backed `contains` edges to child views, or a compile-time `skip` decision. Do not submit root-level `planned_sections: []` or ordinary source-bound `sections: []`.
|
|
65
|
+
3. Otherwise, skip navigation-only / placeholder-only material; keep a short
|
|
66
|
+
`unresolved[]` note only when the deferred relation remains useful.
|
|
67
|
+
|
|
68
|
+
Do not create a hidden domain-gate object. A kept placeholder needs support:
|
|
69
|
+
source refs, approved graph support, or explicit user-confirmed retrieval value.
|
|
70
|
+
For Domain placeholders, write only resolved current/existing children as typed
|
|
71
|
+
`edges[]`; if all children are unresolved/deferred relation clues, keep those
|
|
72
|
+
target hints in `unresolved[]`. If the source names only an atomic concept and
|
|
73
|
+
that term is useful on its own, prefer a concise term Entity title without
|
|
74
|
+
scope/process suffixes.
|
|
75
|
+
|
|
76
|
+
For no-write placeholder summaries, describe only the preserved page identity and unresolved navigation clues. Do not say the Node "provides navigation/links/relations to X" unless those targets are resolved graph children or rendered links; say the source contains deferred navigation clues instead.
|
|
77
|
+
|
|
78
|
+
## Entity Tag Rules
|
|
79
|
+
|
|
80
|
+
Use `tags` to state what the Entity is. Legal combinations:
|
|
81
|
+
|
|
82
|
+
| Case | Tags |
|
|
83
|
+
|---|---|
|
|
84
|
+
| Runtime/code object | one A tag: `app`, `service`, `lib`, `cli`, `module`, or `symbol` |
|
|
85
|
+
| Product-analysis object | one B tag: `application` or `system` |
|
|
86
|
+
| Code + product object | one A tag plus one B tag |
|
|
87
|
+
| Pure term / pattern | only `term` |
|
|
88
|
+
|
|
89
|
+
`term` is mutually exclusive with A/B tags. React is `[lib]`, not `[lib, term]`; if a separate term entry is useful, create another Entity tagged `[term]` and let the structure plan express the relation as a typed edge or unresolved relation with `source_refs[]`.
|
|
90
|
+
|
|
91
|
+
## Action Gate
|
|
92
|
+
|
|
93
|
+
Use `node_type: action` only after the Node Type Order says action. Fill the
|
|
94
|
+
action reasoning checklist in your working notes; persist only fields accepted by
|
|
95
|
+
the current structure schema.
|
|
96
|
+
|
|
97
|
+
The action probe uses five booleans as a reasoning checklist, but the semantic
|
|
98
|
+
bar is:
|
|
99
|
+
|
|
100
|
+
| Field | Meaning | Evidence rule |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| `has_steps_or_phases` | Process evidence exists: steps, phases, trigger -> handling -> result, role collaboration, or repeatable plan. | Hard requirement; support it from span evidence. |
|
|
103
|
+
| `has_actor_or_role` | A user, system, operator, service, or role performs the work. | May be inferred; record the source. |
|
|
104
|
+
| `has_outcome_or_goal` | The process has a target result, acceptance condition, or operational goal. | May be inferred; record the source. |
|
|
105
|
+
| `is_repeatable_or_planned` | The work is repeatable, scheduled, policy-like, or intentionally planned. | May be inferred; record the source. |
|
|
106
|
+
| `queries_answerable_with_refs` | The Node can answer how/when/who/what-to-do questions from cited spans. | May be inferred; record the source. |
|
|
107
|
+
|
|
108
|
+
Do not emit an Action for a single sentence, a one-off conclusion, a short operation, or a parallel enumeration. Those become Sections under the owning Entity or Domain. The only single-Section Action exceptions are source-backed `user-story`, `scenario`, and incident/action-item records with lifecycle, acceptance, or tracking identity.
|
|
109
|
+
|
|
110
|
+
Action anti-examples:
|
|
111
|
+
|
|
112
|
+
| Candidate | Correct routing |
|
|
113
|
+
|---|---|
|
|
114
|
+
| "migrate to X tool" as one conclusion | `decision` Section under the owning Entity |
|
|
115
|
+
| "component X usage" as one sentence | `description` + maybe `example` under X |
|
|
116
|
+
| "submit -> validate -> generate" as one unexpanded sentence | `spec` Section under X/Y |
|
|
117
|
+
| "three API call modes" | `comparison`, `spec`, or `description` Section; not Action |
|
|
118
|
+
|
|
119
|
+
## Fake Entity Gate
|
|
120
|
+
|
|
121
|
+
A relationship-style title is only suspicious by itself. Downgrade or change type when at least **two** signals are true:
|
|
122
|
+
|
|
123
|
+
1. Title contains relationship language such as "X impact on Y", "Y under X", "Y side of X", "X migration", or "X collection".
|
|
124
|
+
2. No legal Entity tag fits.
|
|
125
|
+
3. The Node does not stand alone away from its upstream Node.
|
|
126
|
+
|
|
127
|
+
Repairs:
|
|
128
|
+
|
|
129
|
+
| Pattern | Repair |
|
|
130
|
+
|---|---|
|
|
131
|
+
| "X impact on Y" | Section under X plus a typed edge or unresolved relation to Y when the evidence supports it |
|
|
132
|
+
| "Y under X condition" | Section under Y; X is a condition in the Section body |
|
|
133
|
+
| "X subsystem migration" | Action only if it clears the Action Gate; otherwise `decision` Section under X |
|
|
134
|
+
| "X error collection" / "X FAQ collection" | `faq` / `incident` Sections under X |
|
|
135
|
+
|
|
136
|
+
## Domain Gate
|
|
137
|
+
|
|
138
|
+
Use `node_type: domain` only for a scope that groups child Nodes. Keep this
|
|
139
|
+
domain reasoning checklist in working notes and persist supported relations through current
|
|
140
|
+
`edges[]` or `unresolved[]`:
|
|
141
|
+
|
|
142
|
+
| Field | Meaning |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `scope_refs[]` | Source refs that describe the scope boundary or grouping. |
|
|
145
|
+
| `child_refs[]` | Working-note candidate ids, local refs, or final slugs for children in the scope; persist valid ones as `edges[]`. |
|
|
146
|
+
| `grouping_reason` | Why these children belong together under this domain. |
|
|
147
|
+
|
|
148
|
+
If a domain has no resolvable child refs, no clear grouping reason, or only one same-file child without a broader scope, do not emit a Domain. For navigation-only / placeholder-only sources with only deferred children, skip the Node after ruling out standalone retrieval or graph value for an atomic-term or concrete Entity; keep only useful unresolved relation notes. Emit an Entity only when evidence names an atomic term or concrete object and choose its Entity tag yourself. The CLI rejects invalid Domain gates; it does not auto-downgrade a Domain or choose fallback tags.
|
|
149
|
+
|
|
150
|
+
Scope-name titles such as "X 业务域", "Y 领域", "business domain", or "technical area" are a warning sign when proposed as Entity. Keep them as Entity only when the subject is an atomic term or concrete object; otherwise use Domain with supported child edges or unresolved relation hints.
|
|
151
|
+
|
|
152
|
+
## Edge Gate
|
|
153
|
+
|
|
154
|
+
Use a typed edge only when all four checks pass:
|
|
155
|
+
|
|
156
|
+
1. Both `from` and `to` nodes exist in the current structure or approved
|
|
157
|
+
knowledge.
|
|
158
|
+
2. The relation type is in the current closed set (`is_a`, `contains`,
|
|
159
|
+
`depends_on`, `corresponds_to`, `causes`, `triggers`, `prerequisite`,
|
|
160
|
+
`applies_to`, `verified_by`, `supersedes`).
|
|
161
|
+
3. `source_refs[]` cite evidence for the relation itself, not just for one
|
|
162
|
+
endpoint.
|
|
163
|
+
4. The relation is stronger than a vague "related" hint.
|
|
164
|
+
|
|
165
|
+
If any check fails, write an `unresolved[]` item instead of an edge.
|
|
166
|
+
|
|
167
|
+
If the source sentence states the relation with uncertainty, keep the edge only
|
|
168
|
+
when the uncertainty is source-authored and preserved through
|
|
169
|
+
`confidence: possible` or `confidence: hypothesis`. Do not use `confidence` for
|
|
170
|
+
Agent uncertainty. If you are uncertain whether the evidence supports the
|
|
171
|
+
relation, write `unresolved[]` instead.
|
|
172
|
+
|
|
173
|
+
## Inference Sources
|
|
174
|
+
|
|
175
|
+
Inference sources are working notes for the action reasoning checklist; do not
|
|
176
|
+
persist this object unless the current schema explicitly exposes it:
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
inference_sources:
|
|
180
|
+
actor:
|
|
181
|
+
source_type: explicit-span
|
|
182
|
+
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
183
|
+
rationale: "The span names the operator role."
|
|
184
|
+
outcome_or_goal:
|
|
185
|
+
source_type: inferred-from-span
|
|
186
|
+
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
187
|
+
rationale: "The span describes recovery as the expected result."
|
|
188
|
+
repeatability_or_plan:
|
|
189
|
+
source_type: heading-and-span
|
|
190
|
+
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
191
|
+
rationale: "The runbook heading and ordered list indicate planned reuse."
|
|
192
|
+
answerability:
|
|
193
|
+
source_type: explicit-span
|
|
194
|
+
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
195
|
+
rationale: "The steps answer how the operation is performed."
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Allowed `source_type` values:
|
|
199
|
+
|
|
200
|
+
| Value | Use when |
|
|
201
|
+
|---|---|
|
|
202
|
+
| `explicit-span` | The evidence span directly states the signal. |
|
|
203
|
+
| `heading-and-span` | The heading plus span text together support the signal. |
|
|
204
|
+
| `ref-node` | An existing or same-decision Node reference supplies the signal. Include `ref_nodes`. |
|
|
205
|
+
| `inferred-from-span` | The signal is inferred from span content. Keep the rationale short and concrete. |
|
|
206
|
+
|
|
207
|
+
Each source must include `rationale` when inferred and at least one of `source_refs[]` or `ref_nodes[]`.
|
|
208
|
+
|
|
209
|
+
## Final Reflection
|
|
210
|
+
|
|
211
|
+
- Entity cannot pick a legal tag, or depends on its upstream title to make sense -> write it as a Section under the upstream Node or change type before submit.
|
|
212
|
+
- Action only supports one Section -> write it as a Section instead of an Action, unless it is a source-backed `user-story`, `scenario`, or incident/action-item record with lifecycle, acceptance, or tracking identity. The discriminator is scale or record identity, not the presence of "step" words.
|
|
213
|
+
- Action "steps" are parallel options/configs -> route to Entity `comparison` / `spec` / `description`.
|
|
214
|
+
- Domain has no children -> delete it or merge it into a larger Domain.
|
|
215
|
+
|
|
216
|
+
## Current CLI Quality Diagnostics
|
|
217
|
+
|
|
218
|
+
Current `context.structure.v1` validation preserves the old Node quality
|
|
219
|
+
checks as deterministic diagnostics:
|
|
220
|
+
|
|
221
|
+
| Diagnostic | Meaning | Required response |
|
|
222
|
+
|---|---|---|
|
|
223
|
+
| `schema.section_kind_invalid` | A planned Section uses a kind outside the current prose kind set. | Replace it with a kind from the schema view; do not invent local kind names. |
|
|
224
|
+
| `schema.section_kind_mount_invalid` | A planned Section kind cannot be mounted on the chosen `node_type`. | Choose a kind allowed by the mount matrix, or reclassify the Node before confirming structure. |
|
|
225
|
+
| `tags.term_conflict` | An Entity uses `term` together with concrete runtime/product tags such as `lib`, `service`, `application`, or `system`. | Split the term from the concrete object, or remove the conflicting tag before staging. |
|
|
226
|
+
| `node.description_dominates` | A non-Action Node has at least half of its planned Sections as `description`. | Re-run kind precision. Keep it only when source evidence is genuinely narrative; otherwise split into `example`, `spec`, `comparison`, `faq`, `incident`, `decision`, `warning`, or `principle`. |
|
|
227
|
+
| `node.thin_concrete_entity` | A concrete Entity has one Section and no child Nodes. | Keep it only when it has stable standalone retrieval value; otherwise merge it into the owning Node. |
|
|
228
|
+
| `node.term_expanded_beyond_definition` | A `term` Entity has grown past a compact definition or owns children. | Move rules, procedures, designs, and examples to the owning Node; keep the term entry narrow. |
|
|
229
|
+
| `node.action_too_thin` | An Action has fewer than two distinct planned Section kinds and no child Action. | Downgrade it to a Section under the owning Node unless evidence supports a repeatable process or a source-backed `user-story`, `scenario`, or incident/action-item record with lifecycle, acceptance, or tracking identity. |
|
|
230
|
+
| `node.domain_without_children` | A Domain has no source-backed `contains` child edge. | Add supported children, keep an explicitly confirmed no-write placeholder, or reclassify the Node. |
|
|
231
|
+
| `edge.confidence_invalid` | An edge declares a confidence value outside the current schema. | Use only `possible` or `hypothesis`, or omit the field for source-certain relations. |
|
|
232
|
+
| `edge.confidence_required` | The cited relation sentence contains source-level uncertainty such as "可能", "疑似", "may", or "might". | Preserve source-authored uncertainty with `confidence: possible` / `confidence: hypothesis`, or move the relation to `unresolved[]`. |
|
|
233
|
+
|
|
234
|
+
Warnings are not automatic blockers, but they are not suggestions to ignore.
|
|
235
|
+
Resolve them or include the user-confirmed rationale when confirming structure.
|