@c4a/context-cli 0.6.1-beta.1 → 0.6.1-beta.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 +32 -7
- package/README.zh-CN.md +17 -3
- package/cli.js +57906 -40477
- package/docs/quickstart.md +16 -5
- package/package.json +3 -2
- package/plugins/README.md +55 -118
- package/plugins/README_CN.md +46 -102
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/continue.md +42 -10
- package/plugins/claude/commands/init.md +20 -10
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/SKILL.md +42 -11
- package/plugins/codex/skills/init/SKILL.md +20 -11
- package/plugins/cursor/.cursor-plugin/plugin.json +2 -3
- package/plugins/cursor/README.md +2 -2
- package/plugins/cursor/commands/context-continue.md +42 -10
- package/plugins/cursor/commands/context-init.md +20 -10
- package/plugins/skills/context-continue/SKILL.md +42 -11
- package/plugins/skills/context-init/SKILL.md +20 -11
- package/providers/context/actions/align-next.yaml +5 -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/ensure-repository-sources.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-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/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/codes.yaml +38 -0
- package/providers/context/graphs/workspace.yaml +469 -0
- package/providers/context/manifest.json +610 -0
- package/providers/context/provider.yaml +12 -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 +32 -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 +32 -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/package-outputs.md +250 -0
- package/providers/context/resources/manuals/reference/package-templates.md +372 -0
- package/providers/context/resources/manuals/reference/project-api.md +664 -0
- package/providers/context/resources/manuals/reference/template-variables.md +247 -0
- package/providers/context/resources/procedures/close-and-build.md +19 -0
- package/providers/context/resources/procedures/code-extraction.md +30 -0
- package/providers/context/resources/procedures/document-capture.md +31 -0
- package/providers/context/resources/procedures/document-classification.md +19 -0
- package/providers/context/resources/procedures/evidence-maintenance.md +20 -0
- package/providers/context/resources/procedures/knowledge-review.md +24 -0
- package/providers/context/resources/procedures/package-output.md +31 -0
- package/providers/context/resources/procedures/project-configuration.md +21 -0
- package/providers/context/resources/procedures/prose-align.md +23 -0
- package/providers/context/resources/procedures/prose-compile.md +20 -0
- package/providers/context/resources/procedures/source-boundary.md +37 -0
- package/{plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md → providers/context/resources/procedures/source-capture-detailed.md} +28 -19
- package/providers/context/resources/procedures/verify-and-repair.md +19 -0
- package/{plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references → providers/context/resources/semantic/align}/candidate-resolution.md +13 -0
- 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 +58 -11
- 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-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/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/references/capture-source.md +0 -201
- 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.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,322 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-prose-align
|
|
3
|
-
description: >
|
|
4
|
-
Internal procedure invoked by the public Context continuation entry; not a user slash command.
|
|
5
|
-
Uses Context document evidence views to propose, validate, and confirm
|
|
6
|
-
`unapproved/structure.yaml` without reading raw snapshots directly.
|
|
7
|
-
tools:
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# skill-prose-align
|
|
12
|
-
|
|
13
|
-
Turn captured document evidence into confirmed structure.
|
|
14
|
-
|
|
15
|
-
## TL;DR
|
|
16
|
-
|
|
17
|
-
- Use this after document capture, or when the user asks to split, merge,
|
|
18
|
-
reorganize, classify, or relate document evidence.
|
|
19
|
-
- When status is `captured-ready-to-classify`, run every returned capture-phase
|
|
20
|
-
evidence command before editing `src/index.ts`. Use the collection-neutral
|
|
21
|
-
title tree, span index, and exact text to propose a mainline collection; wait
|
|
22
|
-
for user confirmation, then declare matching align/compile/review phases.
|
|
23
|
-
- The first product output is a structure draft, not final page body.
|
|
24
|
-
- Read source material only through CLI evidence views: `read-plan`,
|
|
25
|
-
`source-index`, `span-detail`, `span-text`, `schema`, and
|
|
26
|
-
`structure-summary`. Additional views are diagnostic surfaces; use the route
|
|
27
|
-
and view set returned by the CLI.
|
|
28
|
-
- Write and validate `context.structure.v1` into `unapproved/structure.yaml`.
|
|
29
|
-
Stop for user confirmation before compile.
|
|
30
|
-
- Before semantic judgment, use the CLI `semantic-rules` View to page through
|
|
31
|
-
only `semantic_rules.required`. Use each selection `reason` to keep unrelated
|
|
32
|
-
rules out of the current judgment.
|
|
33
|
-
- Plan source evidence as Sections before promoting any heading to a Node/View.
|
|
34
|
-
Promotion depends on source-backed standalone retrieval identity, not on a
|
|
35
|
-
hard-coded section kind or collection name.
|
|
36
|
-
- Do not produce or validate a structure payload from this entry file alone. A
|
|
37
|
-
ruleset already present in the active context may be reused only when both its
|
|
38
|
-
`handle` and `digest` match. If the context was compacted, the digest changed,
|
|
39
|
-
or the rule content is no longer present, resume the CLI rule-page sequence.
|
|
40
|
-
- When status reaches `structure-ready` or `needs-prose-compile`, hand off to
|
|
41
|
-
`${CLAUDE_PLUGIN_ROOT}/skills/skill-prose-compile/SKILL.md`.
|
|
42
|
-
- Compile, review, close, verify, and build remain separate gates.
|
|
43
|
-
|
|
44
|
-
<reference>
|
|
45
|
-
|
|
46
|
-
## User-Facing Gates
|
|
47
|
-
|
|
48
|
-
Use semantic labels, not SDK function names:
|
|
49
|
-
|
|
50
|
-
| Gate | Say this | Do not say this first |
|
|
51
|
-
|---|---|---|
|
|
52
|
-
| Collection classification | "I have inspected the captured evidence. Based on these source characteristics, I recommend this knowledge category; please confirm before I configure compilation." | Guessing from a filename, URL, or SDK collection enum before investigation |
|
|
53
|
-
| Material investigation | "I will read the evidence index and source spans through Context, then propose a structure draft." | `alignProse`, `source-index`, `context.structure.v1` |
|
|
54
|
-
| Structure confirmation | "Confirming this structure freezes page paths, section ownership, and relationships for this compile round." | `unapproved/structure.yaml` as a raw parameter |
|
|
55
|
-
| Compile handoff | "The structure is confirmed; I will switch to source-bound compile for draft pages." | Continuing to edit structure in compile |
|
|
56
|
-
|
|
57
|
-
## Runtime Discipline
|
|
58
|
-
|
|
59
|
-
`skill-continue-workflow` owns global state routing; this Skill owns only the
|
|
60
|
-
align phase selected by that route. Use CLI evidence/rule/diagnostic Views,
|
|
61
|
-
follow their exact continuation commands, and treat hints as subordinate to
|
|
62
|
-
`next_action`. Evidence reads may be parallel; stage, confirm, Review apply,
|
|
63
|
-
close, and build writes remain serial. Never reconstruct digest values or
|
|
64
|
-
inspect CLI-managed state files as a substitute for a View.
|
|
65
|
-
- If a payload is too large for a heredoc, stage it under
|
|
66
|
-
`.tmp/agent-payloads/<run-id>/...` in the workspace root and redirect stdin
|
|
67
|
-
from that file. Never reuse fixed `/tmp/c4a-*` names, and never place agent
|
|
68
|
-
scratch payloads under CLI-managed `.tmp/context-cli/`, `sources/`,
|
|
69
|
-
`unapproved/`, `knowledge/`, `dist/`, or package output directories.
|
|
70
|
-
- If a validation or view response includes `reason_code`, `path`, `missing[]`,
|
|
71
|
-
`diagnostics`, `repair_hints`, or `agent_hints`, treat those fields as the
|
|
72
|
-
repair contract. Do not recover by replaying a stale manual route, editing
|
|
73
|
-
rendered files, or guessing schema aliases.
|
|
74
|
-
|
|
75
|
-
## Evidence Views
|
|
76
|
-
|
|
77
|
-
Recommended read order:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
context run align:<type>:<source>:<collection> --view read-plan --format json
|
|
81
|
-
context run align:<type>:<source>:<collection> --view source-index --compact --format json
|
|
82
|
-
context run align:<type>:<source>:<collection> --view span-detail --span <source-ref> --format json
|
|
83
|
-
context run align:<type>:<source>:<collection> --view span-text --span <source-ref> --format json
|
|
84
|
-
context run align:<type>:<source>:<collection> --view schema --format json
|
|
85
|
-
context run align:<type>:<source>:<collection> --view structure-summary --input <structure.yaml> --format json
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Use CLI-returned `next_command` values for pagination. Do not reconstruct
|
|
89
|
-
documents with ad hoc `cat`, `grep`, or scripts against `sources/` or `.tmp`.
|
|
90
|
-
|
|
91
|
-
## Structure Contract
|
|
92
|
-
|
|
93
|
-
The structure draft uses `schema_version: context.structure.v1` and lives at
|
|
94
|
-
`unapproved/structure.yaml` after staging. It contains:
|
|
95
|
-
|
|
96
|
-
- lifecycle state such as validated/confirmed and frozen snapshot metadata;
|
|
97
|
-
- concept `nodes[]` with stable `node_ref`, `node_type`, title/summary, and
|
|
98
|
-
ownership;
|
|
99
|
-
- materialized `views[]` with `view_ref`, collection, path, section plans, and
|
|
100
|
-
evidence refs;
|
|
101
|
-
- typed edges using the closed set defined by the CLI;
|
|
102
|
-
- unresolved items when evidence is weak, conflicting, or the target node is
|
|
103
|
-
missing.
|
|
104
|
-
|
|
105
|
-
Confirmed structure is a human gate. Validation passing is not the same as
|
|
106
|
-
confirmation. Do not write `lifecycle.state: confirmed`, `confirmed_by`,
|
|
107
|
-
`confirmed_at`, or `structure_digest` until the user has explicitly confirmed
|
|
108
|
-
the structure proposal in the conversation.
|
|
109
|
-
|
|
110
|
-
When the current conversation explicitly authorizes fully managed operation,
|
|
111
|
-
use the CLI-returned `--stage --managed` command after successful validation.
|
|
112
|
-
The CLI records `confirmed_by: managed-session`; validation errors and unresolved
|
|
113
|
-
evidence still block confirmation. Never persist managed mode in `defineProject`
|
|
114
|
-
or reuse it in another conversation.
|
|
115
|
-
|
|
116
|
-
## Procedure References
|
|
117
|
-
|
|
118
|
-
These are current structure planning rules. They define the source-bound
|
|
119
|
-
semantic gates for Node planning, section ownership, and relationship handling.
|
|
120
|
-
|
|
121
|
-
| Decision | Reference |
|
|
122
|
-
|---|---|
|
|
123
|
-
| Structure planning, Node ownership, density, candidate resolution | [references/internal-procedures/structure-planning.md](references/internal-procedures/structure-planning.md) |
|
|
124
|
-
| Node type, title, tags, fake entity, action/domain gates, edge gates | [references/internal-procedures/structure-planning/references/gates.md](references/internal-procedures/structure-planning/references/gates.md) |
|
|
125
|
-
| Source density and coarse reading judgment | [references/internal-procedures/structure-planning/references/density-profile.md](references/internal-procedures/structure-planning/references/density-profile.md) |
|
|
126
|
-
| Candidate anomalies, stable ids, paths, duplicates, and conflicts | [references/internal-procedures/structure-planning/references/candidate-resolution.md](references/internal-procedures/structure-planning/references/candidate-resolution.md) |
|
|
127
|
-
|
|
128
|
-
</reference>
|
|
129
|
-
|
|
130
|
-
<procedures>
|
|
131
|
-
|
|
132
|
-
### Step 1 — Open Material Investigation
|
|
133
|
-
|
|
134
|
-
Run:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
context run align:<type>:<source>:<collection> --view read-plan --format json
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Use the returned views, budgets, snapshot hash, and next actions. If the CLI
|
|
141
|
-
reports a missing or stale snapshot, route back to source capture/refresh. Do
|
|
142
|
-
not read the snapshot file yourself.
|
|
143
|
-
|
|
144
|
-
### Step 2 — Read Evidence Through The Index
|
|
145
|
-
|
|
146
|
-
Read a compact index before requesting exact spans:
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
context run align:<type>:<source>:<collection> --view source-index --compact --format json
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
For exact evidence, copy CLI-returned source refs or next commands:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
context run align:<type>:<source>:<collection> --view span-detail --span <source-ref> --format json
|
|
156
|
-
context run align:<type>:<source>:<collection> --view span-text --span <source-ref> --format json
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Keep a short note of what evidence supports each proposed node, section, and
|
|
160
|
-
edge. If the evidence is weak or conflicting, keep it as unresolved instead of
|
|
161
|
-
turning it into a fact.
|
|
162
|
-
|
|
163
|
-
Before drafting structure, read:
|
|
164
|
-
|
|
165
|
-
- [references/internal-procedures/structure-planning.md](references/internal-procedures/structure-planning.md)
|
|
166
|
-
- [references/internal-procedures/structure-planning/references/gates.md](references/internal-procedures/structure-planning/references/gates.md)
|
|
167
|
-
- [references/internal-procedures/structure-planning/references/density-profile.md](references/internal-procedures/structure-planning/references/density-profile.md)
|
|
168
|
-
- [references/internal-procedures/structure-planning/references/candidate-resolution.md](references/internal-procedures/structure-planning/references/candidate-resolution.md)
|
|
169
|
-
|
|
170
|
-
Do not treat this as optional background. These files contain the current
|
|
171
|
-
semantic gates for source-bound structure planning. A structure payload drafted
|
|
172
|
-
without the applicable references is incomplete, even if the CLI schema accepts
|
|
173
|
-
its shape.
|
|
174
|
-
|
|
175
|
-
### Step 3 — Draft And Validate Structure
|
|
176
|
-
|
|
177
|
-
Request the schema:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
context run align:<type>:<source>:<collection> --view schema --format json
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Create a `context.structure.v1` YAML file. The draft may include a one-page-per
|
|
184
|
-
source shape, but that is represented as ordinary nodes and sections; it does
|
|
185
|
-
not bypass structure confirmation.
|
|
186
|
-
|
|
187
|
-
For small payloads, use stdin/heredoc. For larger payloads, write a scratch file
|
|
188
|
-
under `.tmp/agent-payloads/<run-id>/` and pass it through `--input`. Scratch
|
|
189
|
-
files are disposable agent working files; they are never phase state and
|
|
190
|
-
must not be read back as a substitute for CLI views.
|
|
191
|
-
|
|
192
|
-
Validate:
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
context run align:<type>:<source>:<collection> --validate --input <structure.yaml> --format json
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Validation returns a compact summary and writes a temporary HTML report under
|
|
199
|
-
`.tmp/context-runtime/reports/`. A validation report with
|
|
200
|
-
`confirmation_ready=false` is an Agent repair artifact, not a user review gate:
|
|
201
|
-
do not ask the user to approve it. The staged report produced after
|
|
202
|
-
`confirmation_ready=true` is the final review surface; use its
|
|
203
|
-
`structure_report.file_url` as the primary user-facing link and include
|
|
204
|
-
`structure_report.absolute_path` as a copyable fallback.
|
|
205
|
-
If the user needs a focused view, run:
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
context run align:<type>:<source>:<collection> --view structure-summary --input <structure.yaml> --format json
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
The explicit `structure-summary` View returns the full summary for focused
|
|
212
|
-
debugging. For user confirmation, prioritize the default first-screen fields:
|
|
213
|
-
`review_notice`, `structure_report`, and `structure_summary_compact`. A valid
|
|
214
|
-
user-facing confirmation prompt must include the report `file_url`, the absolute
|
|
215
|
-
path fallback, and a compact summary of collections/views/unresolved/diagnostics.
|
|
216
|
-
Do not ask the user to confirm from counts alone.
|
|
217
|
-
|
|
218
|
-
Repair diagnostics by routing them to the right decision:
|
|
219
|
-
|
|
220
|
-
- source ref or snapshot mismatch -> reread evidence views or refresh capture;
|
|
221
|
-
- unsupported node/section/edge -> remove it or mark unresolved;
|
|
222
|
-
- duplicate/conflict -> ask the user which structure should win;
|
|
223
|
-
- illegal edge type, missing target node, or edge without source refs -> fix the
|
|
224
|
-
structure or keep the relation unresolved;
|
|
225
|
-
- stale structure -> regenerate from the current snapshot hash.
|
|
226
|
-
|
|
227
|
-
When validation returns `repair_confirmation_blockers`, follow its exact repair
|
|
228
|
-
route without stopping for human confirmation. `--repair suggested-splits`
|
|
229
|
-
mechanically splits non-contiguous source mirror Sections; write its
|
|
230
|
-
`repaired_payload` to a scratch YAML file and validate again. For oversized
|
|
231
|
-
Views, use the returned child-View and contains-edge suggestions, but classify
|
|
232
|
-
each child Node from evidence instead of mechanically inheriting the parent
|
|
233
|
-
type. Repair other diagnostics from evidence and validate again. Ask the user only when evidence
|
|
234
|
-
supports multiple incompatible semantic choices, and label that question as a
|
|
235
|
-
structure-design choice rather than final review. Do not stage until
|
|
236
|
-
`confirmation_ready=true`.
|
|
237
|
-
|
|
238
|
-
### Step 4 — Review Structure Before Confirmation
|
|
239
|
-
|
|
240
|
-
After validation reports `confirmation_ready=true`, stage the draft. The stage
|
|
241
|
-
command opens the final report. Then show the user:
|
|
242
|
-
|
|
243
|
-
- node list and planned paths;
|
|
244
|
-
- section ownership;
|
|
245
|
-
- typed edges and unresolved relation candidates;
|
|
246
|
-
- expected compile order;
|
|
247
|
-
- downstream impact: these choices freeze paths, section ownership, and
|
|
248
|
-
relationships for this compile round.
|
|
249
|
-
- the `structure_report.file_url` generated by validate or `--view
|
|
250
|
-
structure-summary`;
|
|
251
|
-
- the `structure_report.absolute_path` fallback in case the host cannot click
|
|
252
|
-
file URLs.
|
|
253
|
-
|
|
254
|
-
If the CLI stage result includes `next_action.human_gate: true`, treat it as a
|
|
255
|
-
hard stop for structure review. Do not ask for a blind "confirm structure"
|
|
256
|
-
reply. Surface the report `file_url`, absolute path, and enough structured
|
|
257
|
-
summary for the user to inspect what will be confirmed.
|
|
258
|
-
|
|
259
|
-
Do not turn `confirmation_blockers` into a preliminary approval round. A
|
|
260
|
-
validator-required page split, continuous-source split, ref repair, or
|
|
261
|
-
structure-spine connection is work to resolve before staging. If a genuinely
|
|
262
|
-
ambiguous semantic choice needs the user, ask only that choice and then resume
|
|
263
|
-
repair; it does not replace the final report-based confirmation.
|
|
264
|
-
|
|
265
|
-
Use the host's multi-choice question tool when available. If unavailable, use a
|
|
266
|
-
short Markdown fallback. Good options are:
|
|
267
|
-
|
|
268
|
-
- Confirm this structure and continue to compile.
|
|
269
|
-
- Revise the structure with additional guidance.
|
|
270
|
-
- Go back to source scope or capture because the evidence set is wrong.
|
|
271
|
-
|
|
272
|
-
Only after confirmation, run the CLI confirmation command, normally:
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
context run align:<type>:<source>:<collection> --confirm --format json
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
If confirming a structure file other than `unapproved/structure.yaml`, pass it
|
|
279
|
-
with `--input <structure.yaml>`. A draft stage in `unapproved/structure.yaml` is
|
|
280
|
-
not confirmation. Do not edit `unapproved/structure.yaml` after confirmation to
|
|
281
|
-
change meaning; return to this gate instead.
|
|
282
|
-
|
|
283
|
-
### Step 5 — Handoff To Compile
|
|
284
|
-
|
|
285
|
-
After the user confirms the structure and the CLI reports `structure-ready` or
|
|
286
|
-
`needs-prose-compile`, stop this procedure and follow:
|
|
287
|
-
|
|
288
|
-
```text
|
|
289
|
-
${CLAUDE_PLUGIN_ROOT}/skills/skill-prose-compile/SKILL.md
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
Do not keep editing structure while compiling. If compile diagnostics show the
|
|
293
|
-
planned structure is wrong, return to this align gate and ask the user to
|
|
294
|
-
confirm the corrected structure.
|
|
295
|
-
|
|
296
|
-
### Step 6 — Self-verify Checklist
|
|
297
|
-
|
|
298
|
-
- [ ] Evidence came only from Context evidence views.
|
|
299
|
-
- [ ] `context.structure.v1` was validated before user confirmation.
|
|
300
|
-
- [ ] User confirmed the structure before compile.
|
|
301
|
-
- [ ] Compile was delegated to `skill-prose-compile`; this procedure did not
|
|
302
|
-
write draft page body.
|
|
303
|
-
- [ ] Relationships are expressed as structure edges or unresolved items.
|
|
304
|
-
- [ ] No direct edits were made to `sources/`, `.tmp`, `unapproved/`,
|
|
305
|
-
`knowledge/`, review HTML, or `dist/`.
|
|
306
|
-
|
|
307
|
-
### Final Report
|
|
308
|
-
|
|
309
|
-
Report in the user's language. Include only:
|
|
310
|
-
|
|
311
|
-
- evidence views actually read;
|
|
312
|
-
- proposed and confirmed node count, section count, edge count, and unresolved
|
|
313
|
-
count;
|
|
314
|
-
- user confirmation outcome;
|
|
315
|
-
- validation warnings that still matter for compile;
|
|
316
|
-
- next route reported by status or the align phase.
|
|
317
|
-
|
|
318
|
-
Do not report payload digests, snapshot hashes, source-ref hashes, absolute
|
|
319
|
-
paths, or scratch file paths unless the CLI explicitly asks the user to repair
|
|
320
|
-
one.
|
|
321
|
-
|
|
322
|
-
</procedures>
|
|
@@ -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.
|