@c4a/context-cli 0.6.1 → 0.6.3
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 +77 -12
- package/README.zh-CN.md +202 -0
- package/cli.js +74066 -45247
- package/docs/context-debug-event-v1.schema.json +29 -0
- package/docs/context-debug-replay-v1.schema.json +33 -0
- package/docs/debug-tracing.md +86 -0
- package/docs/quickstart.md +23 -5
- package/package.json +8 -3
- package/plugins/README.md +60 -118
- package/plugins/README_CN.md +51 -102
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/continue.md +61 -10
- package/plugins/claude/commands/init.md +26 -11
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/SKILL.md +61 -11
- package/plugins/codex/skills/init/SKILL.md +28 -14
- package/plugins/cursor/.cursor-plugin/plugin.json +2 -3
- package/plugins/cursor/README.md +2 -2
- package/plugins/cursor/commands/context-continue.md +61 -10
- package/plugins/cursor/commands/context-init.md +26 -11
- package/plugins/skills/context-continue/SKILL.md +61 -11
- package/plugins/skills/context-init/SKILL.md +28 -14
- package/providers/context/actions/accept-package-templates.yaml +5 -0
- package/providers/context/actions/align-next.yaml +6 -0
- package/providers/context/actions/apply-managed-review.yaml +5 -0
- package/providers/context/actions/apply-structure-confirmation.yaml +5 -0
- package/providers/context/actions/build-next.yaml +5 -0
- package/providers/context/actions/capture-next.yaml +5 -0
- package/providers/context/actions/close-approved-knowledge.yaml +5 -0
- package/providers/context/actions/compile-next.yaml +5 -0
- package/providers/context/actions/configure-code-extraction.yaml +5 -0
- package/providers/context/actions/configure-document-capture.yaml +5 -0
- package/providers/context/actions/configure-package-output.yaml +5 -0
- package/providers/context/actions/configure-prose-lifecycle.yaml +5 -0
- package/providers/context/actions/extract-next.yaml +5 -0
- package/providers/context/actions/inspect-document-classification.yaml +5 -0
- package/providers/context/actions/inspect-repository-recovery.yaml +6 -0
- package/providers/context/actions/inspect-review.yaml +5 -0
- package/providers/context/actions/inspect-structure.yaml +5 -0
- package/providers/context/actions/maintain-evidence.yaml +6 -0
- package/providers/context/actions/materialize-context-view.yaml +8 -0
- package/providers/context/actions/reconcile-review-identities.yaml +5 -0
- package/providers/context/actions/register-source-batch.yaml +7 -0
- package/providers/context/actions/repair-project-entry.yaml +5 -0
- package/providers/context/actions/repair-verification.yaml +5 -0
- package/providers/context/actions/repair-workspace-state.yaml +5 -0
- package/providers/context/actions/restore-repository-sources.yaml +7 -0
- package/providers/context/codes.yaml +41 -0
- package/providers/context/graphs/workspace.yaml +536 -0
- package/providers/context/manifest.json +700 -0
- package/providers/context/provider.yaml +12 -0
- package/providers/context/resources/diagnostics/projection-stale.md +13 -0
- package/providers/context/resources/diagnostics/verification.md +21 -0
- package/providers/context/resources/diagnostics/workspace-state.md +27 -0
- package/providers/context/resources/dialogue/code-extraction.md +34 -0
- package/providers/context/resources/dialogue/document-capture.md +29 -0
- package/providers/context/resources/dialogue/document-classification.md +33 -0
- package/providers/context/resources/dialogue/evidence-maintenance.md +26 -0
- package/providers/context/resources/dialogue/human-gates.md +34 -0
- package/providers/context/resources/dialogue/knowledge-review.md +27 -0
- package/providers/context/resources/dialogue/package-output.md +30 -0
- package/providers/context/resources/dialogue/repository-source-recovery.md +23 -0
- package/providers/context/resources/dialogue/source-boundary.md +29 -0
- package/providers/context/resources/dialogue/structure-confirmation.md +44 -0
- package/providers/context/resources/manuals/guides/lark-resources.md +121 -0
- package/providers/context/resources/manuals/guides/package-outputs.md +267 -0
- package/providers/context/resources/manuals/reference/package-templates.md +378 -0
- package/providers/context/resources/manuals/reference/project-api.md +825 -0
- package/providers/context/resources/manuals/reference/template-variables.md +248 -0
- package/providers/context/resources/procedures/close-and-build.md +23 -0
- package/providers/context/resources/procedures/code-extraction.md +50 -0
- package/providers/context/resources/procedures/document-capture.md +49 -0
- package/providers/context/resources/procedures/document-classification.md +22 -0
- package/providers/context/resources/procedures/evidence-maintenance.md +20 -0
- package/providers/context/resources/procedures/knowledge-review.md +34 -0
- package/providers/context/resources/procedures/package-output.md +37 -0
- package/providers/context/resources/procedures/project-configuration.md +21 -0
- package/providers/context/resources/procedures/prose-align.md +68 -0
- package/providers/context/resources/procedures/prose-compile.md +23 -0
- package/providers/context/resources/procedures/repository-source-recovery.md +43 -0
- package/providers/context/resources/procedures/source-boundary.md +48 -0
- package/{plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md → providers/context/resources/procedures/source-capture-detailed.md} +54 -19
- package/providers/context/resources/procedures/verify-and-repair.md +31 -0
- package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/candidate-resolution.md +17 -2
- package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/density-profile.md +11 -0
- package/{plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/gates.md +13 -0
- package/{plugins/cursor/skills/skill-prose-align/references/internal-procedures → providers/context/resources/semantic/align}/structure-planning.md +62 -12
- package/providers/context/resources/semantic/compile/index.md +31 -0
- package/providers/context/resources/views/package-current.yaml +6 -0
- package/providers/context/resources/views/review-current.yaml +6 -0
- package/providers/context/resources/views/source-boundary.yaml +6 -0
- package/providers/context/resources/views/source-current.yaml +6 -0
- package/providers/context/resources/views/structure-current.yaml +6 -0
- package/providers/context/resources/views/verification-current.yaml +6 -0
- package/providers/context/resources/views/workspace-current.yaml +6 -0
- package/providers/context/schemas/evidence-maintenance-input.schema.json +30 -0
- package/providers/context/schemas/prose-structure-batch.schema.json +35 -0
- package/providers/context/schemas/repository-source-recovery.schema.json +40 -0
- package/providers/context/schemas/source-batch-input.schema.json +189 -0
- package/providers/context/scripts/render-context-view.mjs +21 -0
- package/plugins/claude/skills/skill-continue-workflow/SKILL.md +0 -235
- package/plugins/claude/skills/skill-init-workspace/SKILL.md +0 -74
- package/plugins/claude/skills/skill-package-output/SKILL.md +0 -180
- package/plugins/claude/skills/skill-prose-align/SKILL.md +0 -322
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/claude/skills/skill-prose-compile/SKILL.md +0 -287
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/claude/skills/skill-review-gate/SKILL.md +0 -138
- package/plugins/claude/skills/skill-source-scope/SKILL.md +0 -525
- package/plugins/claude/skills/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/codex/skills/continue/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +0 -525
- package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/codex/skills/init/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +0 -525
- package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +0 -235
- package/plugins/cursor/skills/skill-init-workspace/SKILL.md +0 -74
- package/plugins/cursor/skills/skill-package-output/SKILL.md +0 -180
- package/plugins/cursor/skills/skill-prose-align/SKILL.md +0 -322
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/cursor/skills/skill-prose-compile/SKILL.md +0 -287
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/cursor/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +0 -138
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +0 -525
- package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/skills/context-continue/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +0 -525
- package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +0 -235
- package/plugins/skills/context-init/references/internal-procedures/skill-init-workspace.md +0 -74
- package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +0 -180
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +0 -322
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +0 -287
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +0 -138
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +0 -525
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-prose-compile
|
|
3
|
-
description: >
|
|
4
|
-
Internal procedure invoked by the public Context continuation entry; not a user slash command.
|
|
5
|
-
Uses confirmed Context document structure to create source-bound draft prose
|
|
6
|
-
candidates through `context.compile-actions.v1`, without reading raw
|
|
7
|
-
snapshots directly.
|
|
8
|
-
tools:
|
|
9
|
-
- Bash
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# skill-prose-compile
|
|
13
|
-
|
|
14
|
-
Compile confirmed document structure into reviewable draft knowledge.
|
|
15
|
-
|
|
16
|
-
## TL;DR
|
|
17
|
-
|
|
18
|
-
- Use this after `context status` reports `structure-ready` or
|
|
19
|
-
`needs-prose-compile`, or when the user explicitly asks to compile confirmed
|
|
20
|
-
prose structure into draft pages.
|
|
21
|
-
- The input is already confirmed `context.structure.v1`; do not redesign node
|
|
22
|
-
ownership, page paths, or relationships here. Return to prose align if those
|
|
23
|
-
are wrong.
|
|
24
|
-
- Read compile context through CLI views only: `blockers`, `read-plan`,
|
|
25
|
-
`node-context`, and `schema`. Start with `blockers` for large or recently
|
|
26
|
-
repaired structures; if it returns section blockers, return to prose align
|
|
27
|
-
instead of drafting compile actions. Use align evidence views only when the
|
|
28
|
-
compile view or validation output gives a specific source ref that needs exact
|
|
29
|
-
text.
|
|
30
|
-
- Emit `context.compile-actions.v1`; the CLI mirrors source spans, derives
|
|
31
|
-
`content_mode`, writes review candidates, and enforces source-bound evidence.
|
|
32
|
-
- The `summary` field in each action is the Agent-authored behavior half only:
|
|
33
|
-
compact source-backed recall text for the cited section. The CLI separately
|
|
34
|
-
renders the reachability half from confirmed typed edges into review metadata;
|
|
35
|
-
do not invent edge summaries or relation fields in the action payload.
|
|
36
|
-
- Default to omitted `content` so the CLI mirrors the cited source span.
|
|
37
|
-
Do not write explicit `content`. If the evidence cannot be represented as a
|
|
38
|
-
faithful mirrored continuous span, split the section or return to prose align
|
|
39
|
-
for a confirmed structure change.
|
|
40
|
-
- Before semantic judgment, use the CLI `semantic-rules` View to page through
|
|
41
|
-
only `semantic_rules.required`; selection `reason` explains why each rule is
|
|
42
|
-
needed for the current node.
|
|
43
|
-
- Do not produce or validate compile actions from this entry file alone. A
|
|
44
|
-
ruleset already present in the active context may be reused only when both its
|
|
45
|
-
`handle` and `digest` match. If the context was compacted, the digest changed,
|
|
46
|
-
or the rule content is no longer present, resume the CLI rule-page sequence.
|
|
47
|
-
|
|
48
|
-
<reference>
|
|
49
|
-
|
|
50
|
-
## User-Facing Gates
|
|
51
|
-
|
|
52
|
-
Use semantic labels, not SDK function names:
|
|
53
|
-
|
|
54
|
-
| Gate | Say this | Do not say this first |
|
|
55
|
-
|---|---|---|
|
|
56
|
-
| Compile context | "I will inspect the confirmed structure and each node's planned evidence before drafting sections." | `node-context`, `context.compile-actions.v1` |
|
|
57
|
-
| Source-bound draft | "I will mirror supported source spans into reviewable draft pages and attach summary/kind metadata." | `compileProse` |
|
|
58
|
-
| Non-mirror evidence | "This section cannot be compiled as-is because the evidence is not one faithful source mirror; we need to split or revise the structure." | "The agent can rewrite this automatically." |
|
|
59
|
-
| Structure mismatch | "This compile cannot proceed because the confirmed structure no longer matches the evidence; we need to return to structure confirmation." | Editing `knowledge/` or `unapproved/` directly |
|
|
60
|
-
|
|
61
|
-
## Runtime Discipline
|
|
62
|
-
|
|
63
|
-
`skill-continue-workflow` owns global state routing; this Skill owns only the
|
|
64
|
-
compile phase selected by that route. Use CLI context/rule/diagnostic Views and
|
|
65
|
-
their exact continuation commands. Hints are subordinate to `next_action`.
|
|
66
|
-
Never inspect CLI-managed state files as a substitute for a View.
|
|
67
|
-
- Compile `read-plan`, `blockers`, `node-context`, and `schema` Views are
|
|
68
|
-
workspace-read-only and may be fetched in parallel. `--validate`, `--stage`,
|
|
69
|
-
structure confirmation, Review apply, and close remain serial mutations.
|
|
70
|
-
- One planned Section produces one compile action. When evidence contains
|
|
71
|
-
independently retrievable units, split them into sibling Sections in align;
|
|
72
|
-
do not split one planned Section into several compile actions.
|
|
73
|
-
- One write still means one View, not one human Review. Stage every View in the
|
|
74
|
-
same confirmed structure sequentially, follow `continue_compile_batch`, and
|
|
75
|
-
open Review only after the CLI reports that the whole batch is prepared.
|
|
76
|
-
- Compile does not get a second, looser rule set. If a rule conflicts with the
|
|
77
|
-
current CLI schema or diagnostics, follow the CLI and repair the payload.
|
|
78
|
-
- Write digest/hash flags are stale guards. Use values returned by the CLI; do
|
|
79
|
-
not parse stdout fragments or host tool-result files to reconstruct them.
|
|
80
|
-
- If a payload is too large for a heredoc, stage it under
|
|
81
|
-
`.tmp/agent-payloads/<run-id>/...` in the workspace root and redirect stdin
|
|
82
|
-
from that file. Never reuse fixed `/tmp/c4a-*` names, and never place agent
|
|
83
|
-
scratch payloads under CLI-managed `.tmp/context-cli/`, `sources/`,
|
|
84
|
-
`unapproved/`, `knowledge/`, `dist/`, review output, or package output
|
|
85
|
-
directories.
|
|
86
|
-
|
|
87
|
-
## Compile Views
|
|
88
|
-
|
|
89
|
-
Recommended read order:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
context run compile:<type>:<source>:<collection> --view blockers --format json
|
|
93
|
-
context run compile:<type>:<source>:<collection> --view read-plan --format json
|
|
94
|
-
context run compile:<type>:<source>:<collection> --view node-context --source <view-ref> --format json
|
|
95
|
-
context run compile:<type>:<source>:<collection> --view schema --format json
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Use CLI-returned `available_view_refs`, `planned_sections`, `local_sources`, and
|
|
99
|
-
`next_action.command`. If `blockers.section_blockers[]` is non-empty, repair the
|
|
100
|
-
structure through align first; do not inspect every node or hand-split compile
|
|
101
|
-
actions. Do not reconstruct the structure by opening `unapproved/structure.yaml`
|
|
102
|
-
or `knowledge/structure.yaml` directly.
|
|
103
|
-
|
|
104
|
-
## Procedure References
|
|
105
|
-
|
|
106
|
-
These are current compile rules for source-bound drafting, judgment, semantic
|
|
107
|
-
repair, and close handoff.
|
|
108
|
-
|
|
109
|
-
| Decision | Reference |
|
|
110
|
-
|---|---|
|
|
111
|
-
| Compile action drafting, section kind, coverage, summaries, content intent | [references/internal-procedures/compile-actions.md](references/internal-procedures/compile-actions.md) |
|
|
112
|
-
| Action/domain compile gates | [references/internal-procedures/compile-actions/references/action-domain-gates.md](references/internal-procedures/compile-actions/references/action-domain-gates.md) |
|
|
113
|
-
| Notes, refresh/update, and structural challenges | [references/internal-procedures/compile-actions/references/notes.md](references/internal-procedures/compile-actions/references/notes.md), [references/internal-procedures/compile-actions/references/refresh-and-update.md](references/internal-procedures/compile-actions/references/refresh-and-update.md), [references/internal-procedures/compile-actions/references/structural-challenges.md](references/internal-procedures/compile-actions/references/structural-challenges.md) |
|
|
114
|
-
| Support, duplicate, replacement, conflict, weak evidence, and relation judgment | [references/internal-procedures/compile-judgment.md](references/internal-procedures/compile-judgment.md), [references/internal-procedures/semantic-judgment.md](references/internal-procedures/semantic-judgment.md) |
|
|
115
|
-
| Leakage, ownership, temporal evidence, disposition, omit, and user confirmation | [references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md](references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md), [references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md](references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md), [references/internal-procedures/semantic-judgment/references/disposition-semantics.md](references/internal-procedures/semantic-judgment/references/disposition-semantics.md), [references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md](references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md), [references/internal-procedures/semantic-judgment/references/user-confirmation.md](references/internal-procedures/semantic-judgment/references/user-confirmation.md) |
|
|
116
|
-
| Close gate and current close output boundaries | [references/internal-procedures/close-gate.md](references/internal-procedures/close-gate.md) |
|
|
117
|
-
|
|
118
|
-
## Compile Contract
|
|
119
|
-
|
|
120
|
-
The compile action payload uses `schema_version: context.compile-actions.v1`.
|
|
121
|
-
Compile may:
|
|
122
|
-
|
|
123
|
-
- mirror source spans as `verbatim`;
|
|
124
|
-
- emit `skip` decisions when no source-backed body should be written. `skip`
|
|
125
|
-
does not produce a placeholder candidate; generated parent-index pages use
|
|
126
|
-
the parent-index compile path, not an action payload placeholder.
|
|
127
|
-
|
|
128
|
-
Relationships and cross references do not go into verbatim body. In current
|
|
129
|
-
output they stay in `structure.yaml` typed edges; this workflow does not render
|
|
130
|
-
relationship reference blocks.
|
|
131
|
-
|
|
132
|
-
</reference>
|
|
133
|
-
|
|
134
|
-
<procedures>
|
|
135
|
-
|
|
136
|
-
### Step 1 — Open Compile Context
|
|
137
|
-
|
|
138
|
-
Run:
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
context run compile:<type>:<source>:<collection> --view blockers --format json
|
|
142
|
-
context run compile:<type>:<source>:<collection> --view read-plan --format json
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Use the returned blockers, node list, source overview, and next action. If the
|
|
146
|
-
blockers view reports section blockers, return to prose align and repair the
|
|
147
|
-
confirmed structure before compile. If the CLI says the structure is missing,
|
|
148
|
-
unconfirmed, stale, frozen against the wrong snapshot, or invalid, return to
|
|
149
|
-
prose align or source capture as indicated.
|
|
150
|
-
|
|
151
|
-
### Step 2 — Inspect One Node
|
|
152
|
-
|
|
153
|
-
For each node that should become draft knowledge, run:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
context run compile:<type>:<source>:<collection> --view node-context --source <view-ref> --format json
|
|
157
|
-
context run compile:<type>:<source>:<collection> --view schema --format json
|
|
158
|
-
context run compile:<type>:<source>:<collection> --view semantic-rules --source <view-ref> --format json
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Follow the semantic-rules `next_action.command` pages before classifying section
|
|
162
|
-
kind, summary, support, skip/update, weak evidence, or structure repair. Do not
|
|
163
|
-
load rules outside the returned required set.
|
|
164
|
-
|
|
165
|
-
Do not treat those references as optional background. They are the current
|
|
166
|
-
compile drafting, judgment, and semantic-repair procedures.
|
|
167
|
-
|
|
168
|
-
When exact evidence text is needed, use the CLI-returned source ref with the
|
|
169
|
-
current evidence view. Do not open snapshot files directly.
|
|
170
|
-
|
|
171
|
-
### Step 3 — Draft And Validate Actions
|
|
172
|
-
|
|
173
|
-
Create a `context.compile-actions.v1` payload for the selected view. Prefer
|
|
174
|
-
omitted `content` with `source_refs[]` so the CLI mirrors source spans.
|
|
175
|
-
If the source evidence is non-contiguous or contains separable examples,
|
|
176
|
-
configuration blocks, lists, or procedures, split the compile actions when the
|
|
177
|
-
confirmed structure supports that split. If the structure is too coarse, return
|
|
178
|
-
to prose align and ask the user to confirm a section split instead of writing
|
|
179
|
-
summarized body text. Explicit `content` / `content_intent` is not part of the
|
|
180
|
-
current compile contract.
|
|
181
|
-
|
|
182
|
-
For small payloads, use stdin/heredoc. For larger payloads, write a scratch file
|
|
183
|
-
under `.tmp/agent-payloads/<run-id>/` and pass it through `--input`. Scratch
|
|
184
|
-
files are disposable agent working files; they are never compile state and must
|
|
185
|
-
not be read back as a substitute for CLI views.
|
|
186
|
-
|
|
187
|
-
Validate:
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
context run compile:<type>:<source>:<collection> --validate --input <compile-actions.yaml> --format json
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Repair diagnostics by routing them to the right decision:
|
|
194
|
-
|
|
195
|
-
- source ref or planned-section mismatch -> reread node-context, or return to
|
|
196
|
-
structure confirmation if ownership is wrong;
|
|
197
|
-
- unsupported kind or op -> use the schema view and current compile references;
|
|
198
|
-
- explicit content -> omit `content` and mirror source, or return to align for
|
|
199
|
-
a section split;
|
|
200
|
-
- weak evidence, duplicate, conflict, omit, or scope issue -> use the compile
|
|
201
|
-
judgment / semantic judgment references and ask the user when required;
|
|
202
|
-
- frozen structure mismatch -> rerun status and return to align/capture as
|
|
203
|
-
directed.
|
|
204
|
-
|
|
205
|
-
Use typed diagnostics as the repair contract:
|
|
206
|
-
|
|
207
|
-
- `reason_code`, `path`, and `missing[]` identify what to fix;
|
|
208
|
-
- warnings are not write blockers unless the response marks them blocking or
|
|
209
|
-
the next action says so;
|
|
210
|
-
- weak evidence, duplicate, conflict, temporal, leakage, ownership, and scope
|
|
211
|
-
issues are semantic review issues, not formatting problems;
|
|
212
|
-
- raw/source-ref pointer diagnostics are evidence checks, not content-quality
|
|
213
|
-
judges.
|
|
214
|
-
|
|
215
|
-
When validation returns a new `next_action.command`, follow that exact command.
|
|
216
|
-
When it returns blocking diagnostics without a write command, repair and
|
|
217
|
-
validate again. Do not stage a compile payload just because the YAML shape looks
|
|
218
|
-
valid.
|
|
219
|
-
|
|
220
|
-
### Step 4 — Stage Draft Candidates
|
|
221
|
-
|
|
222
|
-
Stage only after validation has no errors:
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
context run compile:<type>:<source>:<collection> --stage --input <compile-actions.yaml> --format json
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
After staging, follow `next_action` exactly:
|
|
229
|
-
|
|
230
|
-
- `continue_compile_batch` with `human_gate=false`: move to the returned next
|
|
231
|
-
View and repeat **Step 2–4**. Do not open Review yet.
|
|
232
|
-
- `review_candidates` with `human_gate=true`: every planned View in this
|
|
233
|
-
confirmed structure slot is prepared; return to `context status`. If
|
|
234
|
-
`pendingStructureTargets` is non-empty, complete those slots first. Delegate
|
|
235
|
-
one collection-level Review to
|
|
236
|
-
`${CLAUDE_PLUGIN_ROOT}/skills/skill-review-gate/SKILL.md` only when status
|
|
237
|
-
reports the complete multi-slot round ready.
|
|
238
|
-
- Use `status.structureBatch` as the complete slot overview. Its evidence Views
|
|
239
|
-
are parallel-safe, its structure mutations are serial, and Review opens once
|
|
240
|
-
after all declared slots are prepared.
|
|
241
|
-
|
|
242
|
-
The CLI blocks Review and close while confirmed Views remain unprepared. Do not
|
|
243
|
-
turn sequential View writes into sequential user approvals.
|
|
244
|
-
|
|
245
|
-
### Step 5 — Close Handoff
|
|
246
|
-
|
|
247
|
-
After the single collection-level batch review apply, return to `context status`. If status says
|
|
248
|
-
`compile-close-needed`, run deterministic close:
|
|
249
|
-
|
|
250
|
-
```bash
|
|
251
|
-
context close --format json
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
Close derives `knowledge/structure.yaml` and edge projection from approved
|
|
255
|
-
knowledge, then runs the final verify gate. It must not rewrite approved
|
|
256
|
-
verbatim body. References, changelog, package index, and section fingerprint
|
|
257
|
-
rebuilds are not current close output.
|
|
258
|
-
|
|
259
|
-
Then route to package output when status reaches `ready-to-build`.
|
|
260
|
-
|
|
261
|
-
### Step 6 — Self-verify Checklist
|
|
262
|
-
|
|
263
|
-
- [ ] Compile started from confirmed structure, not a new structure proposal.
|
|
264
|
-
- [ ] Node context and schema came from compile phase views.
|
|
265
|
-
- [ ] Compile references were read before choosing kind/summary/support.
|
|
266
|
-
- [ ] Actions mirror source by default and do not invent body text.
|
|
267
|
-
- [ ] No explicit reader-visible `content` was written by the Agent.
|
|
268
|
-
- [ ] Relationships are expressed as structure edges, not inserted into
|
|
269
|
-
verbatim text.
|
|
270
|
-
- [ ] No direct edits were made to `sources/`, `.tmp`, `unapproved/`,
|
|
271
|
-
`knowledge/`, review HTML, or `dist/`.
|
|
272
|
-
- [ ] Every planned View was staged before opening the one batch Review.
|
|
273
|
-
|
|
274
|
-
### Final Report
|
|
275
|
-
|
|
276
|
-
Report in the user's language. Include only:
|
|
277
|
-
|
|
278
|
-
- view refs compiled in this round;
|
|
279
|
-
- candidate ids staged and whether they contain verbatim or empty sections;
|
|
280
|
-
- validation warnings that still matter for review;
|
|
281
|
-
- whether review, close, verify, or build is the next status route.
|
|
282
|
-
|
|
283
|
-
Do not report internal payload digests, source-ref hashes, internal workspace
|
|
284
|
-
paths, absolute paths, scratch file paths, or raw CLI JSON unless the user asks
|
|
285
|
-
for debug output.
|
|
286
|
-
|
|
287
|
-
</procedures>
|
package/plugins/claude/skills/skill-prose-compile/references/internal-procedures/close-gate.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: close-gate
|
|
3
|
-
description: >
|
|
4
|
-
Internal procedure invoked by the current compile/continue flow; not a user
|
|
5
|
-
slash command. Runs after review apply. Triggers `context close --format json`,
|
|
6
|
-
which derives knowledge/structure.yaml, projects approved edges, and runs the
|
|
7
|
-
final verify gate. Agent intervention is limited to interpreting CLI output
|
|
8
|
-
and routing verify errors back to source capture, align structure, compile
|
|
9
|
-
actions, or review as appropriate. The skill never hand-edits rendered
|
|
10
|
-
knowledge.
|
|
11
|
-
tools:
|
|
12
|
-
- Bash
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# close-gate — approved structure projection + final verify
|
|
16
|
-
|
|
17
|
-
Close a compile run. The CLI does the work; the skill reads the
|
|
18
|
-
CLI's output and routes any failure back to the correct upstream
|
|
19
|
-
command. It does not hand-edit rendered knowledge.
|
|
20
|
-
|
|
21
|
-
## TL;DR — Non-negotiables
|
|
22
|
-
|
|
23
|
-
- CLI-driven. `context close --format json` derives `knowledge/structure.yaml`,
|
|
24
|
-
projects approved edges, and verifies the final workspace including edge
|
|
25
|
-
source refs. Use the command's stdout + exit code; that's the close's full
|
|
26
|
-
output.
|
|
27
|
-
- **Agent NEVER edits rendered knowledge from the close stage.** The CLI is the
|
|
28
|
-
sole writer for approved structure projection. If verify reports an error
|
|
29
|
-
here, route it back, not around:
|
|
30
|
-
- Content / Section issues → re-run the current compile gate for the affected
|
|
31
|
-
node after fixing compile actions.
|
|
32
|
-
- Structural issues → return to the align structure gate and reconfirm.
|
|
33
|
-
- Source/evidence issues → recapture the affected source, then rerun align or
|
|
34
|
-
compile as status instructs.
|
|
35
|
-
- Exit 0 → summarise approved node count, approved edge count, structural edge
|
|
36
|
-
contract status, and verify status. References, changelog, package index,
|
|
37
|
-
section fingerprints, and full incremental cache rebuilds are not current
|
|
38
|
-
close output.
|
|
39
|
-
- Exit 2 → report the full issue list verbatim + point at the right re-entry command above. Do not hand-open the affected rendered article.
|
|
40
|
-
- Materialized knowledge means approved Markdown plus its approved
|
|
41
|
-
`knowledge/structure.yaml` projection. A compile skip action records reviewed
|
|
42
|
-
evidence, but it does not by itself materialize an arbitrary finalized Node.
|
|
43
|
-
- Never re-run compile actions from close to paper over verify failures. Draft
|
|
44
|
-
failures belong in the compile loop.
|
|
45
|
-
- Do not use Python, Node.js, shell scripts, `ls`, `find`, `rg`, `cat`, or similar ad-hoc commands to inspect `sources/`, `unapproved/`, `knowledge/`, or `dist/` files.
|
|
46
|
-
- Current close can self-heal stale or malformed `knowledge/structure.yaml`
|
|
47
|
-
projection by deriving it again from approved Markdown and approved edge
|
|
48
|
-
sources. It must not rewrite verbatim section body.
|
|
49
|
-
- LLM-assisted repair (`--fix-with-llm`) is not a current close action.
|
|
50
|
-
- Output language: summary prose matches the user's language; CLI output, issue codes, file paths stay as printed.
|
|
51
|
-
- Current align state is internal CLI state, not a file protocol. The CLI owns
|
|
52
|
-
this lifecycle — the agent must not move, delete, or archive workspace output
|
|
53
|
-
files by hand.
|
|
54
|
-
- Semantic decisions are applied and recorded before close. Compile-close does
|
|
55
|
-
not judge or rewrite semantic decisions; it only verifies the already-applied
|
|
56
|
-
workspace and rebuilds approved structure projection.
|
|
57
|
-
|
|
58
|
-
<reference>
|
|
59
|
-
|
|
60
|
-
## Stages inside `context close --format json`
|
|
61
|
-
|
|
62
|
-
Close is one in-process command with one exit code:
|
|
63
|
-
|
|
64
|
-
1. **Approved knowledge scan** — reads approved Markdown only through CLI
|
|
65
|
-
project readers.
|
|
66
|
-
2. **Structure projection** — writes deterministic `knowledge/structure.yaml`
|
|
67
|
-
with nodes, approved edge projection, input hash, and structural edge
|
|
68
|
-
contract status.
|
|
69
|
-
3. **Workspace verify** — runs the final verify gate. Any error prevents close
|
|
70
|
-
readiness.
|
|
71
|
-
4. **Status receipt** — reports whether close is ready and which upstream gate
|
|
72
|
-
owns any failure.
|
|
73
|
-
|
|
74
|
-
## Outcome routing
|
|
75
|
-
|
|
76
|
-
| Outcome | Agent action |
|
|
77
|
-
|---|---|
|
|
78
|
-
| Ready, verify pass | Summarise approved nodes, approved edges, structural edge contract, and verify status. Stop. |
|
|
79
|
-
| Ready, verify warnings only | Summarise warning codes and state that build may proceed when warnings are allowed by status/build gate. |
|
|
80
|
-
| Verify error in approved section content/evidence | Surface the issue list and route back to compile actions or source recapture as indicated by status. Do not edit approved Markdown. |
|
|
81
|
-
| Verify error in approved structure projection | Run `context close --format json` once more only when status says the projection is close-repairable; otherwise return to align structure. |
|
|
82
|
-
| Source/evidence stale or missing | Route to source capture/refresh, then rerun align/compile as status instructs. |
|
|
83
|
-
|
|
84
|
-
The close stage never edits rendered knowledge on the agent side. Every verify
|
|
85
|
-
error routes back to the correct upstream gate (source capture, align
|
|
86
|
-
structure, compile actions, or review), never sideways into a hand Edit. Use
|
|
87
|
-
the CLI issue code and hint printed by `context close --format json` for the
|
|
88
|
-
error→command mapping.
|
|
89
|
-
|
|
90
|
-
References, changelog, section fingerprints, and package index rebuilds are not
|
|
91
|
-
current close outputs.
|
|
92
|
-
|
|
93
|
-
</reference>
|
|
94
|
-
|
|
95
|
-
<procedures>
|
|
96
|
-
|
|
97
|
-
### Step 1 — Invoke close
|
|
98
|
-
|
|
99
|
-
Run `context close --format json`. The caller may have already invoked it;
|
|
100
|
-
check for existing output before re-running.
|
|
101
|
-
|
|
102
|
-
### Step 2 — Interpret
|
|
103
|
-
|
|
104
|
-
Use stdout + stderr. The exit code selects the path via [Outcome routing](#outcome-routing).
|
|
105
|
-
|
|
106
|
-
### Step 3 — Route errors to the correct upstream command
|
|
107
|
-
|
|
108
|
-
For each error in the CLI's report, classify via [Outcome routing](#outcome-routing) and name the re-entry command in your report. Do NOT hand-edit rendered knowledge — that violates the CLI-sole-writer principle and masks the real upstream fix. Specifically:
|
|
109
|
-
|
|
110
|
-
- Section / content issue → rerun the current compile gate for that node.
|
|
111
|
-
- Structure issue → return to align structure and user confirmation.
|
|
112
|
-
- Source/evidence issue → recapture the affected source, then rerun align or
|
|
113
|
-
compile as status instructs.
|
|
114
|
-
|
|
115
|
-
One pass. If the CLI reports multiple errors, list them all and let the user choose the order; do not loop the close stage itself.
|
|
116
|
-
|
|
117
|
-
### Step 4 — Report
|
|
118
|
-
|
|
119
|
-
Summarise in the user's language:
|
|
120
|
-
|
|
121
|
-
- Approved node count.
|
|
122
|
-
- Approved edge count and structural edge contract status.
|
|
123
|
-
- Verify result: pass / pass-with-unverifiable-evidence / fail, with issue
|
|
124
|
-
codes verbatim.
|
|
125
|
-
|
|
126
|
-
Stop. Do not auto-invoke follow-on commands.
|
|
127
|
-
|
|
128
|
-
### Step 5 — Final guardrails
|
|
129
|
-
|
|
130
|
-
Run close once, surface every error with its re-entry command, and never inspect or edit rendered knowledge outside the CLI.
|
|
131
|
-
|
|
132
|
-
</procedures>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Action and Domain gates
|
|
2
|
-
|
|
3
|
-
Consult this reference when **`node.node_type` is `action` or `domain`**. For
|
|
4
|
-
`entity` Nodes, ignore this file and follow the main SKILL.md procedure.
|
|
5
|
-
|
|
6
|
-
## Action Nodes (`node.node_type === "action"`)
|
|
7
|
-
|
|
8
|
-
Treat the confirmed node type and planned sections as the compile boundary for
|
|
9
|
-
procedural claims. An Action Node exists because align confirmed process
|
|
10
|
-
evidence: steps/phases, trigger -> handling -> result, role collaboration, or a
|
|
11
|
-
repeatable plan. Actor, goal/outcome, repeatability, answerability, trigger,
|
|
12
|
-
step, and phase claims **must** come from the selected planned section
|
|
13
|
-
`source_refs[]`; do not invent process semantics from the title alone.
|
|
14
|
-
|
|
15
|
-
| Evidence pattern | What it authorizes |
|
|
16
|
-
|---|---|
|
|
17
|
-
| Planned section source refs contain ordered steps, phases, or repeatable handling | `spec` or `example` Sections for procedure content. |
|
|
18
|
-
| Planned section source refs explicitly name actor, goal, outcome, or repeatability | Concise `description` / `spec` Sections using those same refs. |
|
|
19
|
-
| No source ref states a trigger | **No trigger Section.** Write goal or applicability if supported, but do not fabricate a trigger sentence. |
|
|
20
|
-
| Existing structure edge or unresolved relation indicates another Node is required for answerability | Mention only what the current source refs support; keep the relation in structure, not in compile action fields or verbatim body. |
|
|
21
|
-
|
|
22
|
-
If the planned sections for an `action` node do not contain source-backed
|
|
23
|
-
process evidence, treat that as a structural defect and return to align using
|
|
24
|
-
[structural-challenges.md](structural-challenges.md). Do not invent an action
|
|
25
|
-
body just because the node type is `action`.
|
|
26
|
-
|
|
27
|
-
If the current evidence can only support one thin Section or only a parallel
|
|
28
|
-
option/config list, do not stretch it into procedure prose. Emit `skip` for the
|
|
29
|
-
unsupported planned section, or return to align so the node can be revised. The
|
|
30
|
-
CLI does not auto-downgrade an Action or choose replacement Entity tags.
|
|
31
|
-
|
|
32
|
-
## Domain Nodes (`node.node_type === "domain"`)
|
|
33
|
-
|
|
34
|
-
Treat Domain nodes as grouping surfaces. The domain's scope and child grouping
|
|
35
|
-
are expressed by confirmed `edges[]` and by source-backed planned sections; they
|
|
36
|
-
do **not** authorize new reader-facing facts by themselves.
|
|
37
|
-
|
|
38
|
-
- Source refs on planned sections may orient coverage of the Domain's range, but
|
|
39
|
-
only those refs can support reader-facing text.
|
|
40
|
-
- Child relations belong to `structure.yaml` typed edges, not active Sections;
|
|
41
|
-
do not turn a child list into a Section.
|
|
42
|
-
- Align-time grouping rationale is not evidence. Do **not** turn it into a
|
|
43
|
-
`description` Section unless the planned source refs state the same claim.
|
|
44
|
-
|
|
45
|
-
Recall the mount matrix limit: Domain Nodes allow only `description`, `warning`, `principle`, `decision`, `faq`. A spec / example / comparison / incident / changelog landing here is a kind/type mismatch — drop down the priority chain or `skip`.
|
|
46
|
-
|
|
47
|
-
## How this slots into the main procedure
|
|
48
|
-
|
|
49
|
-
- **Step 1 — Sanity-check**: after the standard `node.id` / mount-matrix check,
|
|
50
|
-
run the action/domain inspection above.
|
|
51
|
-
- **Step 2 — Classify**: respect the gate's authorization boundary when picking kinds.
|
|
52
|
-
- **Step 5 — Self-verify**: confirm no Section was written from evidence the gate disallowed.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Note snippets
|
|
2
|
-
|
|
3
|
-
Consult this reference only when the current CLI exposes note evidence in a
|
|
4
|
-
source-bound phase view. Note evidence carries conversation material
|
|
5
|
-
(revisions, decisions, brainstorms) rather than primary source documents.
|
|
6
|
-
|
|
7
|
-
## TL;DR
|
|
8
|
-
|
|
9
|
-
Note snippets are **prioritization hints, not write authority**. `note_intent`, `anchored_to[]`, and `revision_kind` may suggest update / replacement / complement / skip, but they never authorize a write without semantic review.
|
|
10
|
-
|
|
11
|
-
## How to route a note snippet
|
|
12
|
-
|
|
13
|
-
When a source evidence entry has `source_type: "note"`:
|
|
14
|
-
|
|
15
|
-
1. **Compare against the anchor first.** If `anchored_to[]` names this Node or one of its Sections, treat that target as the candidate for `update` / replacement review / `add` (as a complement) / `skip`. **Do not create a new Node** from the note title here — that is an align-time concern.
|
|
16
|
-
|
|
17
|
-
2. **Use `note_intent` and `revision_kind` to bias the action**:
|
|
18
|
-
|
|
19
|
-
| `note_intent` | typical action |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `revision` | `update` when meaning stays the same; otherwise replacement review against the anchored Section |
|
|
22
|
-
| `decision` | `add` a `decision` Section when no equivalent exists; otherwise `update` |
|
|
23
|
-
| `brainstorm` | usually `skip` unless the brainstorm explicitly confirms a fact the Node should record |
|
|
24
|
-
|
|
25
|
-
`revision_kind` (`replace` / `clarify` / ...) refines the choice within `revision`.
|
|
26
|
-
|
|
27
|
-
3. **No-write reviewed-no-write case.** If the note says "don't modify active
|
|
28
|
-
knowledge yet" or the correct outcome is no-write after review, emit `skip`
|
|
29
|
-
with the note's current `source_refs[]` when the CLI exposes them. This lets
|
|
30
|
-
semantic review record `reviewed_no_write` instead of treating the skip as an
|
|
31
|
-
unreviewed no-op.
|
|
32
|
-
|
|
33
|
-
4. **Bare skip is not allowed for notes.** A bare `skip` (no evidence) is only
|
|
34
|
-
for deterministic no-op cases such as unchanged input or pure navigation.
|
|
35
|
-
Notes always carry an anchor and an intent; the skip must cite the note's
|
|
36
|
-
explicit source ref when the current CLI exposes one.
|
|
37
|
-
|
|
38
|
-
## Where this lives in the main procedure
|
|
39
|
-
|
|
40
|
-
- **Step 2 — Classify**: run the note-first comparison **before** the generic kind priority chain. If the note resolves to `update` / replacement review / `skip` (reviewed), record the current action or user/structure route and move on; do not also process the same note through the generic chain.
|
|
41
|
-
- **Step 5 — Self-verify**: every note snippet was either consumed by an
|
|
42
|
-
anchored action or carried into a `skip` with `source_refs[]` when the current
|
|
43
|
-
CLI exposes citeable refs.
|
|
44
|
-
|
|
45
|
-
Notes never become compile challenge actions on their own. If a note describes a
|
|
46
|
-
structural problem (missing Action, wrong parent, etc.), capture or cite the
|
|
47
|
-
underlying source evidence and return to the structure gate described in
|
|
48
|
-
`references/structural-challenges.md`.
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Refresh and update
|
|
2
|
-
|
|
3
|
-
Consult this reference when **any** of the following holds:
|
|
4
|
-
|
|
5
|
-
- `existing.sections[]` is non-empty (Node already has active knowledge; this is a refresh, not a first compile).
|
|
6
|
-
- `incremental.status` is `unchanged` or `full-context` (non-default incremental signals).
|
|
7
|
-
- `incremental.locator_only_changes[]` is non-empty (locator-only deltas without content changes).
|
|
8
|
-
|
|
9
|
-
For first compile of a fresh Node with `incremental.status === "changed-only"`, skip this file.
|
|
10
|
-
|
|
11
|
-
## Incremental status handling
|
|
12
|
-
|
|
13
|
-
| `incremental.status` | What to do |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `changed-only` (default) | Normal path — main SKILL.md procedure applies as written. |
|
|
16
|
-
| `unchanged` | Emit exactly one `skip` action with a brief reason. Do not iterate snippets. |
|
|
17
|
-
| `full-context` | Draft from the full fallback. **Preserve `unknown_inputs[]` reasons** in any abort/retry explanation so the caller sees why the fallback was needed. |
|
|
18
|
-
|
|
19
|
-
The CLI may deterministically skip unchanged output or update locator-only evidence before writing. **Do not force artificial content changes to bypass fingerprint skip** — those skips are part of the protocol, not a problem to route around.
|
|
20
|
-
|
|
21
|
-
## Locator-only changes
|
|
22
|
-
|
|
23
|
-
`incremental.locator_only_changes[]` entries always carry `agent_action: "none"` and `handled_by: "compile-close"`. **Do not emit a draft action for those Sections** unless the same Section also appears in `changed_blocks[]` with a real content change.
|
|
24
|
-
|
|
25
|
-
## Reconciling with `existing.sections[]`
|
|
26
|
-
|
|
27
|
-
When `existing.sections[]` is non-empty, every section id you read here is a
|
|
28
|
-
potential same-section `update` target or a signal that the structure/user gate
|
|
29
|
-
must decide a higher-risk replacement or withdrawal. Walk the existing Sections
|
|
30
|
-
in order and decide:
|
|
31
|
-
|
|
32
|
-
| Raw evidence vs existing Section | op |
|
|
33
|
-
|---|---|
|
|
34
|
-
| Raw still supports the existing claim unchanged | Emit nothing (or one summarising `skip`) |
|
|
35
|
-
| Raw clarifies or rephrases without changing meaning | `update` — same `section-N` stays active |
|
|
36
|
-
| Raw changes meaning (new spec value, reversed decision) | Stop and route to user/structure review; do not emulate a replacement with `update` |
|
|
37
|
-
| Raw removes the supporting evidence | Stop and route to user/structure review; do not hide the previous active section with a compile no-write |
|
|
38
|
-
|
|
39
|
-
### Replacement vs `update` semantics
|
|
40
|
-
|
|
41
|
-
Replacement preserves the audit trail so readers can see that the prior policy
|
|
42
|
-
changed — **critical for specs / decisions / principles**. Use `update` only
|
|
43
|
-
for typo / wording fixes / detail additions that do not change meaning. When
|
|
44
|
-
meaning changes or support disappears, do not write a compile action until the
|
|
45
|
-
user/structure gate has chosen the intended disposition.
|
|
46
|
-
|
|
47
|
-
### Current output mechanics
|
|
48
|
-
|
|
49
|
-
- `update` keeps the same planned section identity. In the current
|
|
50
|
-
`context.compile-actions.v1` shape, emit `op: "update"` with `section_id`,
|
|
51
|
-
`kind` when needed, `summary` when useful, and current `source_refs[]`. Omit
|
|
52
|
-
`content` so the CLI mirrors the new cited source span. If the intended update
|
|
53
|
-
requires translation, compression, or reorganization, stop and return to the
|
|
54
|
-
structure/user gate instead of writing reader-visible content in compile.
|
|
55
|
-
- Fresh replacement content is a new structure/review decision, not a current
|
|
56
|
-
compile write shape. Preserve the semantic judgment in the user report or
|
|
57
|
-
unresolved structure discussion and route back to the appropriate gate; do
|
|
58
|
-
not invent unsupported target fields.
|
|
59
|
-
|
|
60
|
-
## Output shape (current update path)
|
|
61
|
-
|
|
62
|
-
```jsonc
|
|
63
|
-
{
|
|
64
|
-
"schema_version": "context.compile-actions.v1",
|
|
65
|
-
"view_ref": "architecture:entity/example",
|
|
66
|
-
"actions": [
|
|
67
|
-
{
|
|
68
|
-
"op": "update",
|
|
69
|
-
"section_id": "retention-policy",
|
|
70
|
-
"kind": "spec",
|
|
71
|
-
"summary": "...",
|
|
72
|
-
"source_refs": ["file:docs/example.md#span:retention L10-14@<span-hash>"]
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## How this slots into the main procedure
|
|
79
|
-
|
|
80
|
-
- **Step 1 — Sanity-check**: when `existing.sections[]` is non-empty, read every section id and status before classifying snippets. When `incremental.status` is `unchanged`, short-circuit with one `skip`.
|
|
81
|
-
- **Step 2 — Classify**: still walk the kind priority chain for each citation-eligible snippet; the reconciliation table above governs which `op` to emit for snippets that map to an existing Section.
|
|
82
|
-
- **Step 5 — Self-verify**: every `update` targets a known planned section id
|
|
83
|
-
from the confirmed structure. If a replacement or withdrawal judgment has no
|
|
84
|
-
accepted compile action shape, stop and route back through review/align
|
|
85
|
-
instead of emitting unsupported fields.
|