@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
package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-package-output
|
|
3
|
-
description: >
|
|
4
|
-
Internal procedure invoked by the public Context continuation entry; not a user slash command.
|
|
5
|
-
Explains package output choices, prefers kb packages, declares selected
|
|
6
|
-
package builders, builds, and inspects generated package structure.
|
|
7
|
-
tools:
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# skill-package-output
|
|
12
|
-
|
|
13
|
-
Choose and build a package output from approved knowledge.
|
|
14
|
-
|
|
15
|
-
## TL;DR
|
|
16
|
-
|
|
17
|
-
- Package output is a human choice. Do not add package builders just because an
|
|
18
|
-
example exists.
|
|
19
|
-
- In explicitly authorized current-conversation fully managed mode, resolve
|
|
20
|
-
this choice from the user's stated deliverable: use an agent knowledge-base
|
|
21
|
-
package for an Agent-facing knowledge workspace, an LLM text bundle only
|
|
22
|
-
when a text/RAG bundle was requested, and skip only when the user asked to
|
|
23
|
-
keep approved Markdown without a package. Do not persist this preference.
|
|
24
|
-
- Recommend an agent knowledge-base package first for agent consumption.
|
|
25
|
-
- Present an LLM text bundle as an alternative for a single text/RAG import
|
|
26
|
-
bundle.
|
|
27
|
-
- Do not use `kbPackage()` or `llmsPackage()` as user-facing option labels.
|
|
28
|
-
Mention those API names only after the user chooses an output shape.
|
|
29
|
-
- Do not offer `both` as a shortcut. Add one output, build, inspect, then ask
|
|
30
|
-
before adding another.
|
|
31
|
-
- Build happens after review and deterministic close. If status says
|
|
32
|
-
`compile-close-needed`, run `context close --format json` before build.
|
|
33
|
-
- Package templates may customize navigation and query guidance, but coverage,
|
|
34
|
-
gap, scope, or known-limit claims must cite approved knowledge,
|
|
35
|
-
`knowledge/structure.yaml`, or `context-build-inventory.json`.
|
|
36
|
-
- Generated package structure, not `context build` alone, proves usability.
|
|
37
|
-
|
|
38
|
-
<reference>
|
|
39
|
-
|
|
40
|
-
## Output Shapes
|
|
41
|
-
|
|
42
|
-
Recommended first output:
|
|
43
|
-
|
|
44
|
-
```text
|
|
45
|
-
dist/<name>-kb/
|
|
46
|
-
├── AGENTS.md
|
|
47
|
-
├── skills/
|
|
48
|
-
│ └── knowledge-query/
|
|
49
|
-
│ └── SKILL.md
|
|
50
|
-
└── wikis/
|
|
51
|
-
├── index.md
|
|
52
|
-
├── <group>/
|
|
53
|
-
│ ├── index.md
|
|
54
|
-
│ └── ...
|
|
55
|
-
└── ...
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Alternative:
|
|
59
|
-
|
|
60
|
-
```text
|
|
61
|
-
dist/<name>-llms/
|
|
62
|
-
└── llms.txt
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
</reference>
|
|
66
|
-
|
|
67
|
-
<procedures>
|
|
68
|
-
|
|
69
|
-
### Step 1 — Read Package Docs
|
|
70
|
-
|
|
71
|
-
Before editing package declarations or templates, read:
|
|
72
|
-
|
|
73
|
-
```text
|
|
74
|
-
node_modules/@c4a/context/docs/guides/package-outputs.md
|
|
75
|
-
node_modules/@c4a/context/docs/reference/package-templates.md
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Step 2 — Explain The Choice
|
|
79
|
-
|
|
80
|
-
Explain in the user's conversation language:
|
|
81
|
-
|
|
82
|
-
- an agent knowledge-base package creates copied approved knowledge pages and
|
|
83
|
-
reusable query guidance under `dist/<name>-kb/`;
|
|
84
|
-
- the default `knowledge-query` skill teaches agents how to query and cite those
|
|
85
|
-
copied approved knowledge pages;
|
|
86
|
-
- the kb template must keep `wikis/index.md` as the OKF bundle entry page;
|
|
87
|
-
- the default `wikis/index.md` is intentionally shallow: it describes the
|
|
88
|
-
bundle and links to next-level directories;
|
|
89
|
-
- `context build` maps internal production collections into OKF roots and
|
|
90
|
-
generates child directory indexes such as `<okf-root>/<group>/index.md`, so
|
|
91
|
-
users can browse from OKF root -> group -> page; `wikis/index.md` is the
|
|
92
|
-
required default OKF root entry, while selected `guides/`, `rules/`, or
|
|
93
|
-
`feats/` roots get their own indexes too;
|
|
94
|
-
- the exact mapping is `codegraph`/`business`/`product` -> `wikis/`,
|
|
95
|
-
`architecture`/`sop`/`faq`/`decision`/`incident` -> `guides/`,
|
|
96
|
-
`standards`/`test` -> `rules/`, and `feats` -> `feats/`;
|
|
97
|
-
- `wikis/` is the structured entity-and-relationship layer; guides and rules
|
|
98
|
-
may explain, operationalize, or constrain it, but co-location does not prove
|
|
99
|
-
a relationship;
|
|
100
|
-
- an LLM text bundle creates one text/RAG import bundle under
|
|
101
|
-
`dist/<name>-llms/`;
|
|
102
|
-
- the user can customize `src/package-templates/kb/` before build;
|
|
103
|
-
- template variables and examples are documented in
|
|
104
|
-
`node_modules/@c4a/context/docs/reference/template-variables.md`;
|
|
105
|
-
- build writes a package inventory such as `context-build-inventory.json`, which
|
|
106
|
-
templates may cite when describing package coverage. Its edge section reports
|
|
107
|
-
the structural edge contract and the evidence status from `context verify`;
|
|
108
|
-
- the user can skip package output for now and keep only `knowledge/`.
|
|
109
|
-
|
|
110
|
-
Outside managed mode, ask which single output to create first using the host's
|
|
111
|
-
native multi-choice tool when available. Use semantic option labels:
|
|
112
|
-
|
|
113
|
-
- Agent knowledge-base package: for agents to query and cite approved knowledge pages.
|
|
114
|
-
- LLM text bundle: for one text/RAG import bundle.
|
|
115
|
-
- Skip package output for now: keep approved Markdown only.
|
|
116
|
-
|
|
117
|
-
### Step 3 — Declare The Selected Package
|
|
118
|
-
|
|
119
|
-
After the user chooses, read the template variable guide if the template needs
|
|
120
|
-
navigation changes:
|
|
121
|
-
|
|
122
|
-
```text
|
|
123
|
-
node_modules/@c4a/context/docs/reference/template-variables.md
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Then edit `src/index.ts` and package templates according to the SDK docs. For
|
|
127
|
-
kb output, prefer a clear package name such as `<source-name>-kb`.
|
|
128
|
-
|
|
129
|
-
### Step 4 — Build And Inspect
|
|
130
|
-
|
|
131
|
-
If status says close is required, run:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
context close --format json
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Do not build from unclosed approved knowledge.
|
|
138
|
-
|
|
139
|
-
Run:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
context build
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Inspect the generated `dist/<name>-kb/` or `dist/<name>-llms/` structure against
|
|
146
|
-
[Output Shapes](#output-shapes). For kb packages, inspect every selected
|
|
147
|
-
OKF root that appears in `context-build-inventory.json`, not only
|
|
148
|
-
`wikis/`.
|
|
149
|
-
If templates are placeholders or knowledge pages are thin, say that plainly and
|
|
150
|
-
stop for user direction.
|
|
151
|
-
|
|
152
|
-
If build reports that a template path collides with copied knowledge, do not
|
|
153
|
-
retry blindly. Explain that template files and selected knowledge cannot render
|
|
154
|
-
to the same path, then rename the template file or ask whether to exclude that
|
|
155
|
-
knowledge path.
|
|
156
|
-
|
|
157
|
-
If build reports a template-boundary diagnostic, repair the template by
|
|
158
|
-
referencing approved knowledge, `knowledge/structure.yaml`, or
|
|
159
|
-
`context-build-inventory.json` for coverage/gap/scope/known-limit statements.
|
|
160
|
-
Do not patch `dist/` as the durable fix; edit the template under
|
|
161
|
-
`src/package-templates/`.
|
|
162
|
-
|
|
163
|
-
### Step 5 — Self-verify Checklist
|
|
164
|
-
|
|
165
|
-
- [ ] The user selected the package output, or explicit current-conversation
|
|
166
|
-
managed mode resolved it from the stated deliverable. If not, return to
|
|
167
|
-
**Step 2**.
|
|
168
|
-
- [ ] Only one output was added first. If not, ask before continuing with more.
|
|
169
|
-
- [ ] A kb package template contains `wikis/index.md` and at least one
|
|
170
|
-
`SKILL.md`.
|
|
171
|
-
- [ ] For kb output, the generated OKF root indexes link to next-level
|
|
172
|
-
directories, and child directory indexes exist when selected knowledge has
|
|
173
|
-
subdirectories.
|
|
174
|
-
- [ ] Template paths do not collide with copied knowledge paths.
|
|
175
|
-
- [ ] Template coverage/gap/scope/known-limit claims cite approved knowledge,
|
|
176
|
-
`knowledge/structure.yaml`, or build inventory.
|
|
177
|
-
- [ ] Generated structure was inspected after build. If not, return to
|
|
178
|
-
**Step 4**.
|
|
179
|
-
|
|
180
|
-
</procedures>
|
|
@@ -1,91 +0,0 @@
|
|
|
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.
|
|
@@ -1,30 +0,0 @@
|
|
|
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.
|
|
@@ -1,263 +0,0 @@
|
|
|
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 user-story / scenario / incident records may be meaningful to
|
|
26
|
-
a human reader, but the CLI does not infer that exception from source prose.
|
|
27
|
-
If the structure cannot express at least two distinct Section kinds or a
|
|
28
|
-
child Action, keep the material as a Section under the owning Node.
|
|
29
|
-
2. **Entity?** A concrete independent subject with retrieval value: deployable code, product/application/system, library/module/CLI/symbol, or an atomic term/pattern.
|
|
30
|
-
3. **Domain?** A container/scope that groups at least one child Node.
|
|
31
|
-
4. Otherwise do not create a Node; leave the material for compile as a Section under the owning Node.
|
|
32
|
-
|
|
33
|
-
Good examples:
|
|
34
|
-
|
|
35
|
-
| Type | Examples |
|
|
36
|
-
|---|---|
|
|
37
|
-
| `domain` | "X business domain", "Y technical area", "Z research topic" |
|
|
38
|
-
| `entity` concrete | `@acme/api-server`, `@acme/ui-kit` `Button`, "X sub-application" |
|
|
39
|
-
| `entity` term | "X identifier", "Y business metric", idempotency |
|
|
40
|
-
| `action` | "user submits X request end-to-end flow", "operator executes Y change flow", "team Z release flow" |
|
|
41
|
-
|
|
42
|
-
## Title and Source Heading Rules
|
|
43
|
-
|
|
44
|
-
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`.
|
|
45
|
-
|
|
46
|
-
After choosing `node_type`, choose the title to fit that type:
|
|
47
|
-
|
|
48
|
-
| Final type | Title shape |
|
|
49
|
-
|---|---|
|
|
50
|
-
| `entity` concrete | The concrete product, service, library, module, CLI, symbol, application, or system name. |
|
|
51
|
-
| `entity` term | The atomic concept or pattern name, without extra scope/process suffixes. |
|
|
52
|
-
| `domain` | The grouping scope that owns child Nodes. |
|
|
53
|
-
| `action` | The executable process / runbook / flow name that passed the Action Gate. |
|
|
54
|
-
|
|
55
|
-
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.
|
|
56
|
-
|
|
57
|
-
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[]`.
|
|
58
|
-
|
|
59
|
-
Relation-only sources should not force title copying or dangling graph edges. Decide placeholder handling in this order:
|
|
60
|
-
|
|
61
|
-
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.
|
|
62
|
-
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: []`.
|
|
63
|
-
3. Otherwise, skip navigation-only / placeholder-only material; keep a short
|
|
64
|
-
`unresolved[]` note only when the deferred relation remains useful.
|
|
65
|
-
|
|
66
|
-
Do not create a hidden domain-gate object. A kept placeholder needs support:
|
|
67
|
-
source refs, approved graph support, or explicit user-confirmed retrieval value.
|
|
68
|
-
For Domain placeholders, write only resolved current/existing children as typed
|
|
69
|
-
`edges[]`; if all children are unresolved/deferred relation clues, keep those
|
|
70
|
-
target hints in `unresolved[]`. If the source names only an atomic concept and
|
|
71
|
-
that term is useful on its own, prefer a concise term Entity title without
|
|
72
|
-
scope/process suffixes.
|
|
73
|
-
|
|
74
|
-
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.
|
|
75
|
-
|
|
76
|
-
## Section Promotion Gate
|
|
77
|
-
|
|
78
|
-
Classify local evidence as a Section before creating a child Node/View. A
|
|
79
|
-
heading, table row, FAQ label, or short sub-topic does not by itself establish a
|
|
80
|
-
standalone page.
|
|
81
|
-
|
|
82
|
-
Promote a Section to a child View only when at least one condition is supported
|
|
83
|
-
by source evidence:
|
|
84
|
-
|
|
85
|
-
1. The title is a concrete product/code object/system/module/library, not just a
|
|
86
|
-
local heading.
|
|
87
|
-
2. The item is an atomic term or pattern that answers standalone lookup
|
|
88
|
-
questions outside the parent page.
|
|
89
|
-
3. The item clears the Action Gate or Domain Gate.
|
|
90
|
-
4. The source gives it independent article identity: owner/date, lifecycle,
|
|
91
|
-
timeline, tracking record, or cross-cutting support scope.
|
|
92
|
-
|
|
93
|
-
Use one content-neutral test for every proposed child View: does cited evidence
|
|
94
|
-
support an independent subject identity, enough context to stand alone, and a
|
|
95
|
-
separate retrieval need? A heading, section kind, collection name, or contains
|
|
96
|
-
edge is not sufficient by itself. The CLI warns when many same-source,
|
|
97
|
-
single-section child Entities look mechanically fragmented, but it does not
|
|
98
|
-
reject a page merely because of its content type.
|
|
99
|
-
|
|
100
|
-
## Entity Tag Rules
|
|
101
|
-
|
|
102
|
-
Use `tags` to state what the Entity is. Legal combinations:
|
|
103
|
-
|
|
104
|
-
| Case | Tags |
|
|
105
|
-
|---|---|
|
|
106
|
-
| Runtime/code object | one A tag: `app`, `service`, `lib`, `cli`, `module`, or `symbol` |
|
|
107
|
-
| Product-analysis object | one B tag: `application` or `system` |
|
|
108
|
-
| Code + product object | one A tag plus one B tag |
|
|
109
|
-
| Pure term / pattern | only `term` |
|
|
110
|
-
|
|
111
|
-
`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[]`.
|
|
112
|
-
|
|
113
|
-
Do not inherit scope tags mechanically. If a parent Entity is tagged `system` or
|
|
114
|
-
`application`, a child Entity should repeat that tag only when it is itself an
|
|
115
|
-
independent system/application. Local aspects under that parent should either
|
|
116
|
-
use their own shape tag or remain Sections.
|
|
117
|
-
|
|
118
|
-
## Action Gate
|
|
119
|
-
|
|
120
|
-
Use `node_type: action` only after the Node Type Order says action. Fill the
|
|
121
|
-
action reasoning checklist in your working notes; persist only fields accepted by
|
|
122
|
-
the current structure schema.
|
|
123
|
-
|
|
124
|
-
The action probe uses five booleans as a reasoning checklist, but the semantic
|
|
125
|
-
bar is:
|
|
126
|
-
|
|
127
|
-
| Field | Meaning | Evidence rule |
|
|
128
|
-
|---|---|---|
|
|
129
|
-
| `has_steps_or_phases` | Process evidence exists: steps, phases, trigger -> handling -> result, role collaboration, or repeatable plan. | Hard requirement; support it from span evidence. |
|
|
130
|
-
| `has_actor_or_role` | A user, system, operator, service, or role performs the work. | May be inferred; record the source. |
|
|
131
|
-
| `has_outcome_or_goal` | The process has a target result, acceptance condition, or operational goal. | May be inferred; record the source. |
|
|
132
|
-
| `is_repeatable_or_planned` | The work is repeatable, scheduled, policy-like, or intentionally planned. | May be inferred; record the source. |
|
|
133
|
-
| `queries_answerable_with_refs` | The Node can answer how/when/who/what-to-do questions from cited spans. | May be inferred; record the source. |
|
|
134
|
-
|
|
135
|
-
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 CLI does not infer single-Section Action exceptions from source prose; represent the material with enough structure or keep it as a Section.
|
|
136
|
-
|
|
137
|
-
Action anti-examples:
|
|
138
|
-
|
|
139
|
-
| Candidate | Correct routing |
|
|
140
|
-
|---|---|
|
|
141
|
-
| "migrate to X tool" as one conclusion | `decision` Section under the owning Entity |
|
|
142
|
-
| "component X usage" as one sentence | `description` + maybe `example` under X |
|
|
143
|
-
| "submit -> validate -> generate" as one unexpanded sentence | `spec` Section under X/Y |
|
|
144
|
-
| "three API call modes" | `comparison`, `spec`, or `description` Section; not Action |
|
|
145
|
-
|
|
146
|
-
## Fake Entity Gate
|
|
147
|
-
|
|
148
|
-
A relationship-style title is only suspicious by itself. Downgrade or change type when at least **two** signals are true:
|
|
149
|
-
|
|
150
|
-
1. Title contains relationship language such as "X impact on Y", "Y under X", "Y side of X", "X migration", or "X collection".
|
|
151
|
-
2. No legal Entity tag fits.
|
|
152
|
-
3. The Node does not stand alone away from its upstream Node.
|
|
153
|
-
|
|
154
|
-
Repairs:
|
|
155
|
-
|
|
156
|
-
| Pattern | Repair |
|
|
157
|
-
|---|---|
|
|
158
|
-
| "X impact on Y" | Section under X plus a typed edge or unresolved relation to Y when the evidence supports it |
|
|
159
|
-
| "Y under X condition" | Section under Y; X is a condition in the Section body |
|
|
160
|
-
| "X subsystem migration" | Action only if it clears the Action Gate; otherwise `decision` Section under X |
|
|
161
|
-
| "X error collection" / "X FAQ collection" | `faq` / `incident` Sections under X |
|
|
162
|
-
|
|
163
|
-
## Domain Gate
|
|
164
|
-
|
|
165
|
-
Use `node_type: domain` only for a scope that groups child Nodes. Keep this
|
|
166
|
-
domain reasoning checklist in working notes and persist supported relations through current
|
|
167
|
-
`edges[]` or `unresolved[]`:
|
|
168
|
-
|
|
169
|
-
| Field | Meaning |
|
|
170
|
-
|---|---|
|
|
171
|
-
| `scope_refs[]` | Source refs that describe the scope boundary or grouping. |
|
|
172
|
-
| `child_refs[]` | Working-note candidate ids, local refs, or final slugs for children in the scope; persist valid ones as `edges[]`. |
|
|
173
|
-
| `grouping_reason` | Why these children belong together under this domain. |
|
|
174
|
-
|
|
175
|
-
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.
|
|
176
|
-
|
|
177
|
-
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.
|
|
178
|
-
|
|
179
|
-
## Edge Gate
|
|
180
|
-
|
|
181
|
-
Use a typed edge only when all four checks pass:
|
|
182
|
-
|
|
183
|
-
1. Both `from` and `to` nodes exist in the current structure or approved
|
|
184
|
-
knowledge.
|
|
185
|
-
2. The relation type is in the current closed set (`is_a`, `contains`,
|
|
186
|
-
`depends_on`, `corresponds_to`, `causes`, `triggers`, `prerequisite`,
|
|
187
|
-
`applies_to`, `verified_by`, `supersedes`).
|
|
188
|
-
3. `source_refs[]` cite evidence for the relation itself, not just for one
|
|
189
|
-
endpoint.
|
|
190
|
-
4. The relation is stronger than a vague "related" hint.
|
|
191
|
-
|
|
192
|
-
If any check fails, write an `unresolved[]` item instead of an edge.
|
|
193
|
-
|
|
194
|
-
If the source sentence states the relation with uncertainty, keep the edge only
|
|
195
|
-
when the uncertainty is source-authored and preserved through
|
|
196
|
-
`confidence: possible` or `confidence: hypothesis`. Do not use `confidence` for
|
|
197
|
-
Agent uncertainty. If you are uncertain whether the evidence supports the
|
|
198
|
-
relation, write `unresolved[]` instead.
|
|
199
|
-
|
|
200
|
-
## Inference Sources
|
|
201
|
-
|
|
202
|
-
Inference sources are working notes for the action reasoning checklist; do not
|
|
203
|
-
persist this object unless the current schema explicitly exposes it:
|
|
204
|
-
|
|
205
|
-
```yaml
|
|
206
|
-
inference_sources:
|
|
207
|
-
actor:
|
|
208
|
-
source_type: explicit-span
|
|
209
|
-
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
210
|
-
rationale: "The span names the operator role."
|
|
211
|
-
outcome_or_goal:
|
|
212
|
-
source_type: inferred-from-span
|
|
213
|
-
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
214
|
-
rationale: "The span describes recovery as the expected result."
|
|
215
|
-
repeatability_or_plan:
|
|
216
|
-
source_type: heading-and-span
|
|
217
|
-
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
218
|
-
rationale: "The runbook heading and ordered list indicate planned reuse."
|
|
219
|
-
answerability:
|
|
220
|
-
source_type: explicit-span
|
|
221
|
-
source_refs: ["file:docs/runbook.md#span:steps L10-18@<span-hash>"]
|
|
222
|
-
rationale: "The steps answer how the operation is performed."
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Allowed `source_type` values:
|
|
226
|
-
|
|
227
|
-
| Value | Use when |
|
|
228
|
-
|---|---|
|
|
229
|
-
| `explicit-span` | The evidence span directly states the signal. |
|
|
230
|
-
| `heading-and-span` | The heading plus span text together support the signal. |
|
|
231
|
-
| `ref-node` | An existing or same-decision Node reference supplies the signal. Include `ref_nodes`. |
|
|
232
|
-
| `inferred-from-span` | The signal is inferred from span content. Keep the rationale short and concrete. |
|
|
233
|
-
|
|
234
|
-
Each source must include `rationale` when inferred and at least one of `source_refs[]` or `ref_nodes[]`.
|
|
235
|
-
|
|
236
|
-
## Final Reflection
|
|
237
|
-
|
|
238
|
-
- 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.
|
|
239
|
-
- Action only supports one Section -> write it as a Section instead of an Action, or add source-backed structure that reaches at least two distinct Section kinds / one child Action. The CLI does not use source prose keywords to grant an exception.
|
|
240
|
-
- Action "steps" are parallel options/configs -> route to Entity `comparison` / `spec` / `description`.
|
|
241
|
-
- Domain has no children -> delete it or merge it into a larger Domain.
|
|
242
|
-
|
|
243
|
-
## Current CLI Quality Diagnostics
|
|
244
|
-
|
|
245
|
-
Current `context.structure.v1` validation preserves the old Node quality
|
|
246
|
-
checks as deterministic diagnostics:
|
|
247
|
-
|
|
248
|
-
| Diagnostic | Meaning | Required response |
|
|
249
|
-
|---|---|---|
|
|
250
|
-
| `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. |
|
|
251
|
-
| `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. |
|
|
252
|
-
| `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. |
|
|
253
|
-
| `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`. |
|
|
254
|
-
| `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. |
|
|
255
|
-
| `node.children_should_be_sections` | One parent contains many same-source, single-section child Entities with no stable shape tag. | Merge those children into parent Sections unless the user confirms each child has standalone lookup value. |
|
|
256
|
-
| `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. |
|
|
257
|
-
| `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, add a distinct Section kind, or add a child Action; the CLI does not infer a single-section exception from source text. |
|
|
258
|
-
| `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. |
|
|
259
|
-
| `tags.child_inherits_system` | A child Entity repeats its parent `system` / `application` scope tag. | Retag by the child’s own shape/scope, or keep the child as a Section if it is only a local aspect. |
|
|
260
|
-
| `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. |
|
|
261
|
-
|
|
262
|
-
Warnings are not automatic blockers, but they are not suggestions to ignore.
|
|
263
|
-
Resolve them or include the user-confirmed rationale when confirming structure.
|